Huw Davies : user32: Fix icon spacing minimium values.
Alexandre Julliard
julliard at winehq.org
Tue May 2 15:58:47 CDT 2017
Module: wine
Branch: master
Commit: 3d47809acad82b253b7d43d034e04cb9ed4add82
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3d47809acad82b253b7d43d034e04cb9ed4add82
Author: Huw Davies <huw at codeweavers.com>
Date: Tue May 2 16:12:38 2017 +0100
user32: Fix icon spacing minimium values.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/sysparams.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index 48fd145..35565f1 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -1487,7 +1487,12 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
if (pvParam != NULL)
ret = get_entry( &entry_ICONHORIZONTALSPACING, uiParam, pvParam );
else
- ret = set_entry( &entry_ICONHORIZONTALSPACING, max( 32, uiParam ), pvParam, fWinIni );
+ {
+ int min_val = 32;
+ if (IsProcessDPIAware())
+ min_val = MulDiv( min_val, get_display_dpi(), USER_DEFAULT_SCREEN_DPI );
+ ret = set_entry( &entry_ICONHORIZONTALSPACING, max( min_val, uiParam ), pvParam, fWinIni );
+ }
break;
case SPI_GETSCREENSAVETIMEOUT:
ret = get_entry( &entry_SCREENSAVETIMEOUT, uiParam, pvParam );
@@ -1525,7 +1530,12 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
if (pvParam != NULL)
ret = get_entry( &entry_ICONVERTICALSPACING, uiParam, pvParam );
else
- ret = set_entry( &entry_ICONVERTICALSPACING, max( 32, uiParam ), pvParam, fWinIni );
+ {
+ int min_val = 32;
+ if (IsProcessDPIAware())
+ min_val = MulDiv( min_val, get_display_dpi(), USER_DEFAULT_SCREEN_DPI );
+ ret = set_entry( &entry_ICONVERTICALSPACING, max( min_val, uiParam ), pvParam, fWinIni );
+ }
break;
case SPI_GETICONTITLEWRAP:
ret = get_entry( &entry_ICONTITLEWRAP, uiParam, pvParam );
More information about the wine-cvs
mailing list