[PATCH 4/4] user32: Scale the button size with screen resolution.

Huw Davies huw at codeweavers.com
Mon Aug 22 03:56:59 CDT 2016


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!).

Huw.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: button.diff
Type: application/octet-stream
Size: 1823 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160822/8d9ae871/attachment.obj>


More information about the wine-devel mailing list