After applying a theme with CaptionBarHeight set, caption height from SPI_GETNONCLIENTMETRICS is set
to the specified size. However in refresh_sysparams(), the caption height is refreshed and the value
from SM_CXSIZE is used and ends up overwriting the theme specified caption height. SM_CYSIZE is the
correct index instead of SM_CXSIZE.
You may need to turn a theme off and on for the correct caption height to take effect after the fix.
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>
If a window is not passed to OpenThemeData(), OpenThemeData() assumes the DPI is 96 according to
tests. And GetThemePartSize() should select theme parts according to the DPI stored in theme
handles rather than using GDI device contexts. Thus, OpenThemeDataForDpi() should be used in place
of OpenThemeData() when DPI is not 96 and theme handles shouldn't be associated with a window.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fix tooltip font size becomes smaller after clicking the apply button in Desktop Integration tab.
For example, the original non-client area tooltip font lfHeight is -11. 11 pixels is 8 points in 96
DPI. Setting font size to 8 points to SPI_SETNONCLIENTMETRICS will make SPI_GETNONCLIENTMETRICS
report lfHeight as 8. With lfHeight being 8, CreateFontIndirectW() creates a smaller font. This
behavior is added by 5b8fdb9. I assume the intention was to save font size in a DPI-independent way.
However, when lfHeight is negative, lfHeight will still be scaled back to 96 DPI before saving it to
registry and scaled to system DPI when it's read from registry. So I think converting to points is
unnecessary.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fix the size up-down control becoming smaller every time the apply button is pressed in the Desktop
Integration tab.
UDM_SETBUDDY always shrinks the buddy window for a up-down control according to tests. And a
PSN_SETACTIVE notification is sent every time the apply button is pressed, thus init_dialog() gets
called again and sends an extra UDM_SETBUDDY message.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This patch allows winecfg to be called with the "/v" parameter to
display the current Windows version. "/v winver" will continue to allow
the Windows version to be updated.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49242
Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The /V switch to winecfg was incorrectly passing the BOOL result through
as the application exit code.
Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Note that szLinkTarget is an array field and thus cannot be NULL.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>