From 75f9e647aa79ac018e5ec90bfea8aa4b391da163 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 6 Nov 2000 05:25:29 +0000 Subject: [PATCH] Take into account the sunken border for Win98 look. Leave a 1 pixel gap to the left of menu bitmap items for symetry (and because Win9x does it). Leave a 1 pixel gap above menu bar items for symetry (and because Win9x does it). --- controls/menu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/controls/menu.c b/controls/menu.c index 19272746e7c..7aa45a9f848 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -854,6 +854,11 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner, { lpitem->rect.right += bm.bmWidth; lpitem->rect.bottom += bm.bmHeight; + if (TWEAK_WineLook == WIN98_LOOK) { + /* Leave space for the sunken border */ + lpitem->rect.right += 2; + lpitem->rect.bottom += 2; + } } } @@ -914,7 +919,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner ) SelectObject( hdc, hMenuFont); start = 0; - maxX = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CXBORDER) : 2 ; + maxX = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CXBORDER) : 2+1 ; while (start < lppop->nItems) { @@ -988,7 +993,7 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, lprect->left, lprect->top, lprect->right, lprect->bottom); lppop->Width = lprect->right - lprect->left; lppop->Height = 0; - maxY = lprect->top; + maxY = lprect->top+1; start = 0; helpPos = -1; while (start < lppop->nItems)