user32: Fix icon spacing minimium values.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2017-05-02 16:12:38 +01:00 committed by Alexandre Julliard
parent fb118b222a
commit 3d47809aca
1 changed files with 12 additions and 2 deletions

View File

@ -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 );