[PATCH] comctl32/trackbar: Scale thumb size with resolution.
Alexandre Julliard
julliard at winehq.org
Tue Jul 17 01:48:10 CDT 2018
Nikolay Sivov <nsivov at codeweavers.com> writes:
> @@ -1488,6 +1489,10 @@ TRACKBAR_InitializeThumb (TRACKBAR_INFO *infoPtr)
> else
> infoPtr->uThumbLen = clientWidth > 9 ? clientWidth - 6 : 4;
>
> + hdc = GetDC(infoPtr->hwndSelf);
> + infoPtr->uThumbLen = MulDiv(infoPtr->uThumbLen, GetDeviceCaps(hdc, LOGPIXELSX), 96);
> + ReleaseDC(infoPtr->hwndSelf, hdc);
You probably want to use GetDpiForWindow() instead. Also it seems to me
that the check against the client rect should be done after scaling.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list