[PATCH 4/4] user32: Scale the button size with screen resolution.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Aug 22 04:18:44 CDT 2016
Huw Davies <huw at codeweavers.com> wrote:
> On 22 Aug 2016, at 09:34, Dmitry Timoshkov <dmitry at baikal.ru> wrote:
> >
> > Huw Davies <huw at codeweavers.com> wrote:
> >
> >> + checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1;
> >> + checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1;
> >
> > Are you sure that user32 is really supposed to scale the buttons? Could that
> > be that it's only new comctl32 implementation should do this kind of thing?
> > Scaling the buttons has the potential of completely distorting the dialog
> > layout, and I really would like to see some tests for this behaviour (even
> > a standalone application would be acceptable).
>
> Yes, I’m sure. It’s pretty difficult to write a non-interactive test short of comparing
> bits in a bitmap. Here’s a very simple test I was using to do this visually. You’ll
> want to ensure that the ‘Use Windows XP style DPI scaling’ box remains checked
> when you change the resolution, otherwise Windows will do its horrible auto-scaling
> thing which will confuse the situation (as well as making everything blurry!).
Thanks, I tested under XP to eliminate the auto-scaling factor, and it appeears
that you are correct: Windows scales the buttons according to current DPI setting.
--
Dmitry.
More information about the wine-devel
mailing list