From 459e0b829e97f8e35597b735fa180f69d922362e Mon Sep 17 00:00:00 2001 From: Juergen Schmied Date: Sun, 18 Apr 1999 09:21:38 +0000 Subject: [PATCH] SystemParametersInfo SPI_GETNONCLIENTMETRICS: implemented menu part. --- misc/main.c | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/misc/main.c b/misc/main.c index ce25e665193..54efa8cb20a 100644 --- a/misc/main.c +++ b/misc/main.c @@ -42,6 +42,7 @@ #include "gdi.h" #include "user.h" #include "wine/winuser16.h" +#include "tweak.h" /**********************************************************************/ @@ -973,16 +974,45 @@ BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam, #define lpnm ((LPNONCLIENTMETRICSA)lpvParam) if( lpnm->cbSize == sizeof(NONCLIENTMETRICSA) ) - { + { LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont); + /* FIXME: initialize geometry entries */ SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0); + + /* caption */ + lpnm->iCaptionWidth = (TWEAK_WineLook > WIN31_LOOK) ? 19 : 12; + lpnm->iCaptionHeight = (TWEAK_WineLook > WIN31_LOOK) ? 19 : 12; + SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0); lpnm->lfCaptionFont.lfWeight = FW_BOLD; - SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, - (LPVOID)&(lpnm->lfSmCaptionFont),0); - SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, - (LPVOID)&(lpnm->lfMenuFont),0); + + /* small caption */ + lpnm->iCaptionWidth = (TWEAK_WineLook > WIN31_LOOK) ? 19 : 10; + lpnm->iCaptionHeight = (TWEAK_WineLook > WIN31_LOOK) ? 19 : 10; + + /* menus, FIXME: names of wine.conf entrys are bogus */ + + lpnm->iMenuWidth = GetProfileIntA("Desktop","MenuWidth", 8); /* size of the menu buttons*/ + lpnm->iMenuHeight = GetProfileIntA("Desktop","MenuHeight", + (TWEAK_WineLook > WIN31_LOOK) ? 8 : 16); + + GetProfileStringA("Desktop", "MenuFont", + (TWEAK_WineLook > WIN31_LOOK) ? "MS Sans Serif": "System", + lpLogFont->lfFaceName, LF_FACESIZE ); + + lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 8); + 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 = ANSI_CHARSET; + lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; + lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; + lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; + SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfStatusFont),0); SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, -- 2.11.4.GIT