Correct some of the system metrics to more closely match Windows

values.
This commit is contained in:
Dmitry Timoshkov 2002-08-28 00:54:53 +00:00 committed by Alexandre Julliard
parent acb308af67
commit b1f2325930
2 changed files with 28 additions and 28 deletions

View file

@ -188,7 +188,7 @@ void SYSMETRICS_Init(void)
sysMetrics[SM_CXMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 112 : 100; sysMetrics[SM_CXMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 112 : 100;
sysMetrics[SM_CYMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 27 : 28; sysMetrics[SM_CYMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 27 : 28;
sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 2; sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 1;
sysMetrics[SM_CYSIZE] = sysMetrics[SM_CXSIZE]; sysMetrics[SM_CYSIZE] = sysMetrics[SM_CXSIZE];
sysMetrics[SM_CXMINTRACK] = sysMetrics[SM_CXMIN]; sysMetrics[SM_CXMINTRACK] = sysMetrics[SM_CXMIN];
sysMetrics[SM_CYMINTRACK] = sysMetrics[SM_CYMIN]; sysMetrics[SM_CYMINTRACK] = sysMetrics[SM_CYMIN];
@ -222,7 +222,7 @@ void SYSMETRICS_Init(void)
sysMetrics[SM_CYSMCAPTION] = 16; sysMetrics[SM_CYSMCAPTION] = 16;
sysMetrics[SM_CXSMSIZE] = 15; sysMetrics[SM_CXSMSIZE] = 15;
sysMetrics[SM_CYSMSIZE] = sysMetrics[SM_CXSMSIZE]; sysMetrics[SM_CYSMSIZE] = sysMetrics[SM_CXSMSIZE];
sysMetrics[SM_CXMENUSIZE] = sysMetrics[SM_CYMENU]; sysMetrics[SM_CXMENUSIZE] = sysMetrics[SM_CYMENU] - 1;
sysMetrics[SM_CYMENUSIZE] = sysMetrics[SM_CXMENUSIZE]; sysMetrics[SM_CYMENUSIZE] = sysMetrics[SM_CXMENUSIZE];
/* FIXME: What do these mean? */ /* FIXME: What do these mean? */

View file

@ -1053,7 +1053,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
GetProfileStringA( "Desktop", "IconTitleFaceName", GetProfileStringA( "Desktop", "IconTitleFaceName",
lfDefault.lfFaceName, lfDefault.lfFaceName,
lpLogFont->lfFaceName, LF_FACESIZE ); lpLogFont->lfFaceName, LF_FACESIZE );
lpLogFont->lfHeight = -GetProfileIntA( "Desktop", "IconTitleSize", 13 ); lpLogFont->lfHeight = -GetProfileIntA( "Desktop", "IconTitleSize", 11 );
lpLogFont->lfWidth = 0; lpLogFont->lfWidth = 0;
lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
lpLogFont->lfWeight = FW_NORMAL; lpLogFont->lfWeight = FW_NORMAL;
@ -1063,7 +1063,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
lpLogFont->lfCharSet = lfDefault.lfCharSet; /* at least 'charset' should not be hard-coded */ lpLogFont->lfCharSet = lfDefault.lfCharSet; /* at least 'charset' should not be hard-coded */
lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; lpLogFont->lfPitchAndFamily = DEFAULT_PITCH;
break; break;
} }
@ -1156,8 +1156,6 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA)) if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA))
{ {
LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont);
/* clear the struct, so we have 'sane' members */ /* clear the struct, so we have 'sane' members */
memset( memset(
(char *)pvParam + sizeof(lpnm->cbSize), (char *)pvParam + sizeof(lpnm->cbSize),
@ -1166,44 +1164,43 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
); );
/* initialize geometry entries */ /* initialize geometry entries */
lpnm->iBorderWidth = -1; /* FIXME */ lpnm->iBorderWidth = 1;
lpnm->iScrollWidth = GetSystemMetrics(SM_CXVSCROLL); lpnm->iScrollWidth = GetSystemMetrics(SM_CXVSCROLL);
lpnm->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL); lpnm->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
/* caption */
/* size of the normal caption buttons */
lpnm->iCaptionWidth = GetSystemMetrics(SM_CXSIZE); lpnm->iCaptionWidth = GetSystemMetrics(SM_CXSIZE);
lpnm->iCaptionHeight = lpnm->iCaptionWidth; lpnm->iCaptionHeight = GetSystemMetrics(SM_CYSIZE);
/* caption font metrics */
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont), 0 ); SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont), 0 );
lpnm->lfCaptionFont.lfWeight = FW_BOLD; lpnm->lfCaptionFont.lfWeight = FW_BOLD;
/* small caption */ /* size of the small caption buttons */
lpnm->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE); lpnm->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
lpnm->iSmCaptionHeight = lpnm->iSmCaptionWidth; lpnm->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
/* small caption font metrics */
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont), 0 ); SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont), 0 );
/* menus, FIXME: names of wine.conf entries are bogus */ /* menus, FIXME: names of wine.conf entries are bogus */
lpnm->iMenuWidth = GetProfileIntA( "Desktop", "MenuWidth", 13 ); /* size of the menu buttons*/ /* size of the menu (MDI) buttons */
lpnm->iMenuHeight = GetProfileIntA( "Desktop", "MenuHeight", lpnm->iMenuWidth = GetSystemMetrics(SM_CXMENUSIZE);
(TWEAK_WineLook > WIN31_LOOK) ? 13 : 27 ); lpnm->iMenuHeight = GetSystemMetrics(SM_CYMENUSIZE);
/* menu font metrics */
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfMenuFont), 0 );
GetProfileStringA( "Desktop", "MenuFont", GetProfileStringA( "Desktop", "MenuFont",
(TWEAK_WineLook > WIN31_LOOK) ? lpnm->lfCaptionFont.lfFaceName : "System", (TWEAK_WineLook > WIN31_LOOK) ? lpnm->lfCaptionFont.lfFaceName : "System",
lpLogFont->lfFaceName, LF_FACESIZE ); lpnm->lfMenuFont.lfFaceName, LF_FACESIZE );
lpnm->lfMenuFont.lfHeight = -GetProfileIntA( "Desktop", "MenuFontSize", 11 );
lpLogFont->lfHeight = -GetProfileIntA( "Desktop", "MenuFontSize", 13 ); lpnm->lfMenuFont.lfWeight = (TWEAK_WineLook > WIN31_LOOK) ? FW_NORMAL : FW_BOLD;
lpLogFont->lfWidth = 0;
lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
lpLogFont->lfWeight = (TWEAK_WineLook > WIN31_LOOK) ? FW_NORMAL : FW_BOLD;
lpLogFont->lfItalic = FALSE;
lpLogFont->lfStrikeOut = FALSE;
lpLogFont->lfUnderline = FALSE;
lpLogFont->lfCharSet = lpnm->lfCaptionFont.lfCharSet;
lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
/* status bar font metrics */
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
(LPVOID)&(lpnm->lfStatusFont), 0 ); (LPVOID)&(lpnm->lfStatusFont), 0 );
/* message font metrics */
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
(LPVOID)&(lpnm->lfMessageFont), 0 ); (LPVOID)&(lpnm->lfMessageFont), 0 );
} }
@ -1587,7 +1584,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
WINE_SPI_FIXME(SPI_SETCURSORS); /* 87 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETCURSORS); /* 87 WINVER >= 0x400 */
WINE_SPI_FIXME(SPI_SETICONS); /* 88 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETICONS); /* 88 WINVER >= 0x400 */
WINE_SPI_FIXME(SPI_GETDEFAULTINPUTLANG); /* 89 WINVER >= 0x400 */ case SPI_GETDEFAULTINPUTLANG: /* 89 WINVER >= 0x400 */
ret = GetKeyboardLayout(0);
break;
WINE_SPI_FIXME(SPI_SETDEFAULTINPUTLANG); /* 90 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETDEFAULTINPUTLANG); /* 90 WINVER >= 0x400 */
WINE_SPI_FIXME(SPI_SETLANGTOGGLE); /* 91 WINVER >= 0x400 */ WINE_SPI_FIXME(SPI_SETLANGTOGGLE); /* 91 WINVER >= 0x400 */