Fix for menubar size

William Poetra Yoga H williampoetra at yahoo.com
Mon Apr 18 08:31:47 CDT 2005


This fixes the menubar size, previously the menubar was a bit too high (there
is a missing row of pixels betweel the caption and the menu).

William Poetra Yoga Hadisoeseno


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
-------------- next part --------------
Index: dlls/user/menu.c
===================================================================
RCS file: /home/wine/wine/dlls/user/menu.c,v
retrieving revision 1.25
diff -u -p -r1.25 menu.c
--- dlls/user/menu.c	14 Apr 2005 13:56:29 -0000	1.25
+++ dlls/user/menu.c	15 Apr 2005 04:37:27 -0000
@@ -1090,7 +1090,7 @@ static void MENU_MenuBarCalcSize( HDC hd
           lprect->left, lprect->top, lprect->right, lprect->bottom);
     lppop->Width  = lprect->right - lprect->left;
     lppop->Height = 0;
-    maxY = lprect->top+1;
+    maxY = lprect->top;
     start = 0;
     helpPos = -1;
     lppop->maxBmpSize.cx = 0;
@@ -1126,7 +1126,7 @@ static void MENU_MenuBarCalcSize( HDC hd
 	while (start < i) lppop->items[start++].rect.bottom = maxY;
     }
 
-    lprect->bottom = maxY;
+    lprect->bottom = maxY + 1;
     lppop->Height = lprect->bottom - lprect->top;
 
     /* Flush right all items between the MF_RIGHTJUSTIFY and */
@@ -1514,7 +1514,7 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT l
     lppop = MENU_GetMenu( hMenu );
     if (lppop == NULL || lprect == NULL)
     {
-        return GetSystemMetrics(SM_CYMENU);
+        return GetSystemMetrics(SM_CYMENU) + 1;
     }
 
     if (suppress_draw)
@@ -3857,7 +3857,7 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, 
     lppop = MENU_GetMenu( hMenu );
     if (lppop == NULL || lprect == NULL)
     {
-        retvalue = GetSystemMetrics(SM_CYMENU);
+        retvalue = GetSystemMetrics(SM_CYMENU) + 1;
         goto END;
     }
 
@@ -3878,7 +3878,7 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, 
 
     if (lppop->nItems == 0)
     {
-        retvalue = GetSystemMetrics(SM_CYMENU);
+        retvalue = GetSystemMetrics(SM_CYMENU) + 1;
         goto END;
     }
 
Index: windows/nonclient.c
===================================================================
RCS file: /home/wine/wine/windows/nonclient.c,v
retrieving revision 1.141
diff -u -p -r1.141 nonclient.c
--- windows/nonclient.c	13 Apr 2005 16:13:45 -0000	1.141
+++ windows/nonclient.c	15 Apr 2005 04:37:28 -0000
@@ -398,7 +398,7 @@ LONG NC_HandleNCCalcSize( HWND hwnd, REC
 	    winRect->top +=
 		MENU_GetMenuBarHeight( hwnd,
 				       winRect->right - winRect->left,
-				       -tmpRect.left, -tmpRect.top ) + 1;
+				       -tmpRect.left, -tmpRect.top );
 	}
 
         if( exStyle & WS_EX_CLIENTEDGE)


More information about the wine-patches mailing list