Menu with multi columns fix.

Rein Klazes wijn at wanadoo.nl
Thu May 5 05:52:52 CDT 2005


Hi, 

This fixes a problem described on the user list:

http://www.winehq.org/hypermail/wine-users/2005/05/0010.html

Changelog:

dlls/user	: menu.c

Multi column popup menu's need some space between the columns.

Rein.
-------------- next part --------------
--- wine/dlls/user/menu.c	2005-04-20 16:40:48.000000000 +0200
+++ mywine/dlls/user/menu.c	2005-05-05 08:23:11.000000000 +0200
@@ -142,6 +142,9 @@ typedef struct
   /* Height of a separator item */
 #define SEPARATOR_HEIGHT 5
 
+  /* Space between 2 columns */
+#define MENU_COL_SPACE 4
+
   /* (other menu->FocusedItem values give the position of the focused item) */
 #define NO_SELECTED_ITEM  0xffff
 
@@ -1017,7 +1020,7 @@ static void MENU_PopupMenuCalcSize( LPPO
     SelectObject( hdc, hMenuFont);
 
     start = 0;
-    maxX = 2 + 1;
+    maxX = 0;
 
     lppop->maxBmpSize.cx = 0;
     lppop->maxBmpSize.cy = 0;
@@ -1025,7 +1028,7 @@ static void MENU_PopupMenuCalcSize( LPPO
     while (start < lppop->nItems)
     {
 	lpitem = &lppop->items[start];
-	orgX = maxX;
+	orgX = maxX + MENU_COL_SPACE ; 
 	orgY = 3;
 
 	maxTab = maxTabWidth = 0;


More information about the wine-patches mailing list