Nikolay Sivov : comctl32/button: Use per-window dpi settings.
Module: wine Branch: master Commit: 40298cc69a9966b678ec45ad4d9ca1aea55d33a5 URL: https://source.winehq.org/git/wine.git/?a=commit;h=40298cc69a9966b678ec45ad4... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jul 17 14:13:05 2018 +0300 comctl32/button: Use per-window dpi settings. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 507820c..56968f9 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -1092,8 +1092,8 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC hDC, UINT action ) GetClientRect(infoPtr->hwnd, &client); rbox = rtext = client; - checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1; - checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1; + checkBoxWidth = 12 * GetDpiForWindow( infoPtr->hwnd ) / 96 + 1; + checkBoxHeight = 12 * GetDpiForWindow( infoPtr->hwnd ) / 96 + 1; if ((hFont = infoPtr->font)) SelectObject( hDC, hFont ); GetCharWidthW( hDC, '0', '0', &text_offset );
participants (1)
-
Alexandre Julliard