The destination rectangle may be smaller than that of theme parts, in which case, the draw size returned is adjusted to fit the destination rectangle. Without passing a destination rectangle to GetThemePartSize(), the function assumes that there is no limit for destination.
This fixes winecfg check boxes missing the upper edge in 192 DPI. You may notice that the check box bitmap is slightly shrank and so the shape is a bit off. However, this is what happens on Windows as well when check box height is set to 8 DLUs.
GetThemePartSize() without destination rectangles are also used in other controls, but manual tests showed that those controls don't shrink their theme background as check boxes do so they are left unchanged.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
From: Zhiyi Zhang zzhang@codeweavers.com
The destination rectangle may be smaller than that of theme parts, in which case, the draw size returned is adjusted to fit the destination rectangle. Without passing a destination rectangle to GetThemePartSize(), the function assumes that there is no limit for destination.
This fixes winecfg check boxes missing the upper edge in 192 DPI. You may notice that the check box bitmap is slightly shrank and so the shape is a bit off. However, this is what happens on Windows as well when check box height is set to 8 DLUs.
GetThemePartSize() without destination rectangles are also used in other controls, but manual tests showed that those controls don't shrink their theme background as check boxes do so they are left unchanged.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comctl32/button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index ee7c2c288b1..089534b2b9d 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -2830,7 +2830,7 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in GetThemeBackgroundContentRect(theme, hDC, part, state, &client_rect, &content_rect); region = set_control_clipping(hDC, &client_rect);
- if (FAILED(GetThemePartSize(theme, hDC, part, state, NULL, TS_DRAW, &box_size))) + if (FAILED(GetThemePartSize(theme, hDC, part, state, &content_rect, TS_DRAW, &box_size))) { box_size.cx = 12 * GetDpiForWindow(infoPtr->hwnd) / 96 + 1; box_size.cy = box_size.cx;
From: Zhiyi Zhang zzhang@codeweavers.com
10 DLUs is the recommended height for check boxes on Windows. 8 DLUs is not enough and may cause shrinking in HiDPI settings.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/cryptui/cryptui.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/cryptui/cryptui.rc b/dlls/cryptui/cryptui.rc index 311cff2a60d..a7a310c99ec 100644 --- a/dlls/cryptui/cryptui.rc +++ b/dlls/cryptui/cryptui.rc @@ -416,15 +416,15 @@ BEGIN AUTORADIOBUTTON "&Cryptographic Message Syntax Standard/PKCS #7 Message (*.p7b)", IDC_EXPORT_FORMAT_CMS, 31,42,280,12, BS_AUTORADIOBUTTON CHECKBOX "&Include all certificates in the certification path if possible", - IDC_EXPORT_CMS_INCLUDE_CHAIN, 44,57,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED + IDC_EXPORT_CMS_INCLUDE_CHAIN, 44,57,280,10, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED AUTORADIOBUTTON "&Personal Information Exchange/PKCS #12 (*.pfx)", IDC_EXPORT_FORMAT_PFX, 31,72,280,12, BS_AUTORADIOBUTTON|WS_DISABLED CHECKBOX "Incl&ude all certificates in the certification path if possible", - IDC_EXPORT_PFX_INCLUDE_CHAIN, 44,87,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED + IDC_EXPORT_PFX_INCLUDE_CHAIN, 44,87,280,10, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED CHECKBOX "&Enable strong encryption", - IDC_EXPORT_PFX_STRONG_ENCRYPTION, 44,102,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED + IDC_EXPORT_PFX_STRONG_ENCRYPTION, 44,102,280,10, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED CHECKBOX "Delete the private &key if the export is successful", - IDC_EXPORT_PFX_DELETE_PRIVATE_KEY, 44,117,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED + IDC_EXPORT_PFX_DELETE_PRIVATE_KEY, 44,117,280,10, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED END
IDD_EXPORT_FILE DIALOG 0,0,317,143
From: Zhiyi Zhang zzhang@codeweavers.com
10 DLUs is the recommended height for check boxes on Windows. 8 DLUs is not enough and may cause shrinking in HiDPI settings.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- programs/winecfg/winecfg.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc index 1faa0a60b55..8775b3b691b 100644 --- a/programs/winecfg/winecfg.rc +++ b/programs/winecfg/winecfg.rc @@ -165,11 +165,11 @@ STYLE WS_CHILD | WS_DISABLED FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Window settings",IDC_STATIC,8,4,244,84 - CONTROL "Automatically capture the &mouse in full-screen windows",IDC_FULLSCREEN_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8 - CONTROL "Allow the window manager to &decorate the windows",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,32,230,8 - CONTROL "Allow the &window manager to control the windows",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,230,8 + CONTROL "Automatically capture the &mouse in full-screen windows",IDC_FULLSCREEN_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,10 + CONTROL "Allow the window manager to &decorate the windows",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,32,230,10 + CONTROL "Allow the &window manager to control the windows",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,230,10 CONTROL "&Emulate a virtual desktop",IDC_ENABLE_DESKTOP,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,15,56,230,8 + BS_AUTOCHECKBOX | WS_TABSTOP,15,56,230,10 LTEXT "Desktop &size:",IDC_DESKTOP_SIZE,15,70,64,16,WS_DISABLED LTEXT "#msgctxt#do not translate#X",IDC_DESKTOP_BY,129,70,8,8,WS_DISABLED EDITTEXT IDC_DESKTOP_WIDTH,84,68,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED @@ -252,7 +252,7 @@ BEGIN LTEXT "S&erial:",IDC_STATIC_SERIAL,15,183,42,12 EDITTEXT IDC_EDIT_SERIAL,59,180,78,13,ES_AUTOHSCROLL | WS_TABSTOP
- CONTROL "&Show dot files",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,205,230,8 + CONTROL "&Show dot files",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,205,230,10 END
IDD_AUDIOCFG DIALOG 0, 0, 260, 220 @@ -299,7 +299,7 @@ BEGIN CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASSA,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | WS_DISABLED, 185,75,15,13
GROUPBOX "MIME types",IDC_STATIC,8,95,244,23 - CONTROL "Manage file &associations",IDC_ENABLE_FILE_ASSOCIATIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,105,230,8 + CONTROL "Manage file &associations",IDC_ENABLE_FILE_ASSOCIATIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,105,230,10
PUSHBUTTON "&Font...",IDC_SYSPARAM_FONT,190,75,55,13,WS_DISABLED GROUPBOX "Folders",IDC_STATIC,8,120,244,94
From: Zhiyi Zhang zzhang@codeweavers.com
10 DLUs is the recommended height for check boxes on Windows.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- programs/winefile/winefile.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/programs/winefile/winefile.rc b/programs/winefile/winefile.rc index 8d0f9940787..30760e5ab81 100644 --- a/programs/winefile/winefile.rc +++ b/programs/winefile/winefile.rc @@ -145,7 +145,7 @@ BEGIN CONTROL "&Other files",IDC_VIEW_TYPE_OTHERS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,13,70,70,10 CONTROL "Show Hidden/&System Files",IDC_VIEW_TYPE_HIDDEN, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,90,140,9 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,90,140,10 DEFPUSHBUTTON "OK",IDOK,104,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,104,24,50,14 END @@ -168,11 +168,11 @@ BEGIN LTEXT "Size:",-1,7,62,59,9 EDITTEXT IDC_STATIC_PROP_SIZE,71,62,170,9,ES_READONLY | NOT WS_BORDER | WS_TABSTOP GROUPBOX "Attributes",-1,7,79,158,46 - CONTROL "&Read Only",IDC_CHECK_READONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,91,68,9 - CONTROL "H&idden",IDC_CHECK_HIDDEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,91,68,9 - CONTROL "&Archive",IDC_CHECK_ARCHIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,101,68,9 - CONTROL "&System",IDC_CHECK_SYSTEM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,101,68,9 - CONTROL "&Compressed",IDC_CHECK_COMPRESSED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,17,111,68,9 + CONTROL "&Read Only",IDC_CHECK_READONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,91,68,10 + CONTROL "H&idden",IDC_CHECK_HIDDEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,91,68,10 + CONTROL "&Archive",IDC_CHECK_ARCHIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,101,68,10 + CONTROL "&System",IDC_CHECK_SYSTEM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,101,68,10 + CONTROL "&Compressed",IDC_CHECK_COMPRESSED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,17,111,68,10 GROUPBOX "Version information",-1,7,129,234,79 LISTBOX IDC_LIST_PROP_VERSION_TYPES,13,139,107,63,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_LIST_PROP_VERSION_VALUES,123,139,111,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL