Hi,

   The menu patch I sent last week was wrong: it causes Win9x's 'magic
items' to be aligned on the left again. This weekend I worked at fixing
it and now I believe that all items following the first menu item that
has MF_RIGHTJUSTIFY (aka MF_HELP) should be aligned to the right. 
   But not bitmaps! 

   Juergen, according to CVS Web you're the one who added the
IS_BITMAP_ITEM check:

Revision 1.32 / (download) - [select for diffs] , Mon Apr 26 14:54:38
1999 UTC (18 months ago) by julliard 
Branch: MAIN 
CVS Tags: Wine-990426 
Changes since 1.31: +23 -19 lines
Diff to previous 1.31 

Juergen Schmied <[EMAIL PROTECTED]>
- align magic buttons right
- shortcuts alignment working again


   Why did you add it? Was it for a Win 3.1 application? Any chance I
might have it? 

   I attached the latest version of my patch for review. Of course it
has to first undo my first patch so it's bigger than it should. 
Hopefully I'll get it right for the next round. 


See also:
   http://fgouget.free.fr/wine/PrgWin95/Chap10.shtml#grafmenu

--
Francois Gouget         [EMAIL PROTECTED]        http://fgouget.free.fr/
                           La terre est une bêta...

Index: controls/menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.88
diff -u -r1.88 menu.c
--- controls/menu.c     2000/10/26 21:47:20     1.88
+++ controls/menu.c     2000/10/30 02:17:59
@@ -1000,7 +1000,7 @@
          /* Parse items until line break or end of menu */
        for (i = start; i < lppop->nItems; i++, lpitem++)
        {
-           if ((helpPos == -1) && (lpitem->fType & MF_HELP)) helpPos = i;
+           if ((helpPos == -1) && (lpitem->fType & MF_RIGHTJUSTIFY)) helpPos = i;
            if ((i != start) &&
                (lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
 
@@ -1025,21 +1025,19 @@
     lprect->bottom = maxY;
     lppop->Height = lprect->bottom - lprect->top;
 
-    if (TWEAK_WineLook == WIN31_LOOK) {
-        /* Flush right all magic items and items between the MF_HELP and */
-        /* the last item (if several lines, only move the last line) */
-        lpitem = &lppop->items[lppop->nItems-1];
-        orgY = lpitem->rect.top;
-        orgX = lprect->right;
-        for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--) {
-            if ( !IS_BITMAP_ITEM(lpitem->fType) && ((helpPos==-1) || (helpPos>i) ))
-                break;                         /* done */
-            if (lpitem->rect.top != orgY) break;       /* Other line */
-            if (lpitem->rect.right >= orgX) break;     /* Too far right already */
-            lpitem->rect.left += orgX - lpitem->rect.right;
-            lpitem->rect.right = orgX;
-            orgX = lpitem->rect.left;
-        }
+    /* Flush right all magic items and items between the MF_RIGHTJUSTIFY and */
+    /* the last item (if several lines, only move the last line) */
+    lpitem = &lppop->items[lppop->nItems-1];
+    orgY = lpitem->rect.top;
+    orgX = lprect->right;
+    for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--) {
+        if ( (helpPos==-1) || (helpPos>i) )
+            break;                             /* done */
+        if (lpitem->rect.top != orgY) break;   /* Other line */
+        if (lpitem->rect.right >= orgX) break; /* Too far right already */
+        lpitem->rect.left += orgX - lpitem->rect.right;
+        lpitem->rect.right = orgX;
+        orgX = lpitem->rect.left;
     }
 }
 

Reply via email to