Commit 58182409 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Fixed the alignment of the MF_RIGHTJUSTIFY menu items.

parent 40060a13
......@@ -1023,7 +1023,7 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect,
/* 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;
......@@ -1048,14 +1048,13 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect,
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 */
/* Flush right all 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 ( !IS_BITMAP_ITEM(lpitem->fType) && ((helpPos==-1) || (helpPos>i) ))
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 */
......@@ -1063,7 +1062,6 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect,
lpitem->rect.right = orgX;
orgX = lpitem->rect.left;
}
}
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment