Menus [3/6]: Draw the column separator properly

Michael Kaufmann hallo at michael-kaufmann.ch
Wed Apr 19 14:39:28 CDT 2006


Changelog:
  - Draw the column separator between two columns and not 1 pixel to the 
left of the second column
-------------- next part --------------
--- menu.c	2006-04-19 21:07:47.000000000 +0200
+++ menu-new.c	2006-04-19 21:07:44.000000000 +0200
@@ -1129,8 +1129,8 @@
     {
 	lpitem = &lppop->items[start];
 	orgX = maxX;
-        if( lpitem->fType & MF_MENUBREAK)
-            orgX += MENU_COL_SPACE; 
+        if( lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))
+            orgX += MENU_COL_SPACE;
 	orgY = MENU_TOP_MARGIN;
 
 	maxTab = maxTabWidth = 0;
@@ -1141,8 +1141,6 @@
 		(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
 
 	    MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, FALSE, lppop );
-
-	    if (lpitem->fType & MF_MENUBARBREAK) orgX++;
 	    maxX = max( maxX, lpitem->rect.right );
 	    orgY = lpitem->rect.bottom;
 	    if (IS_STRING_ITEM(lpitem->fType) && lpitem->xTab)
@@ -1450,11 +1448,13 @@
     SetBkMode( hdc, TRANSPARENT );
 
     /* vertical separator */
+
     if (!menuBar && (lpitem->fType & MF_MENUBARBREAK))
     {
         HPEN oldPen;
         RECT rc = rect;
 
+        rc.left -= MENU_COL_SPACE / 2 + 1;
         rc.top = 3;
         rc.bottom = height - 3;
         if (flat_menu)


More information about the wine-patches mailing list