Module: wine Branch: master Commit: 2f094cbfe6439fe6c5e2860ac4254bcbe54ac72f URL: https://gitlab.winehq.org/wine/wine/-/commit/2f094cbfe6439fe6c5e2860ac4254bc...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Thu Mar 14 12:27:02 2024 +0800
win32u: Support HiDPI for the non-client close button in WS_EX_TOOLWINDOW windows.
---
dlls/win32u/defwnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index cf3af86d161..744f4527dc6 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -1462,8 +1462,8 @@ static void draw_close_button( HWND hwnd, HDC hdc, BOOL down, BOOL grayed ) { /* Windows does not use SM_CXSMSIZE and SM_CYSMSIZE * it uses 11x11 for the close button in tool window */ - const int bmp_height = 11; - const int bmp_width = 11; + int bmp_height = muldiv( 11, get_dpi_for_window( hwnd ), 96 ); + int bmp_width = bmp_height; int caption_height = get_system_metrics( SM_CYSMCAPTION );
rect.top = rect.top + (caption_height - 1 - bmp_height) / 2;