Fixed the alignment of the MF_RIGHTJUSTIFY menu items.
This commit is contained in:
parent
40060a1365
commit
5818240965
|
@ -1023,7 +1023,7 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect,
|
||||||
/* Parse items until line break or end of menu */
|
/* Parse items until line break or end of menu */
|
||||||
for (i = start; i < lppop->nItems; i++, lpitem++)
|
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) &&
|
if ((i != start) &&
|
||||||
(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
|
(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
|
||||||
|
|
||||||
|
@ -1048,21 +1048,19 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect,
|
||||||
lprect->bottom = maxY;
|
lprect->bottom = maxY;
|
||||||
lppop->Height = lprect->bottom - lprect->top;
|
lppop->Height = lprect->bottom - lprect->top;
|
||||||
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK) {
|
/* Flush right all items between the MF_RIGHTJUSTIFY and */
|
||||||
/* Flush right all magic items and items between the MF_HELP and */
|
/* the last item (if several lines, only move the last line) */
|
||||||
/* the last item (if several lines, only move the last line) */
|
lpitem = &lppop->items[lppop->nItems-1];
|
||||||
lpitem = &lppop->items[lppop->nItems-1];
|
orgY = lpitem->rect.top;
|
||||||
orgY = lpitem->rect.top;
|
orgX = lprect->right;
|
||||||
orgX = lprect->right;
|
for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--) {
|
||||||
for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--) {
|
if ( (helpPos==-1) || (helpPos>i) )
|
||||||
if ( !IS_BITMAP_ITEM(lpitem->fType) && ((helpPos==-1) || (helpPos>i) ))
|
break; /* done */
|
||||||
break; /* done */
|
if (lpitem->rect.top != orgY) break; /* Other line */
|
||||||
if (lpitem->rect.top != orgY) break; /* Other line */
|
if (lpitem->rect.right >= orgX) break; /* Too far right already */
|
||||||
if (lpitem->rect.right >= orgX) break; /* Too far right already */
|
lpitem->rect.left += orgX - lpitem->rect.right;
|
||||||
lpitem->rect.left += orgX - lpitem->rect.right;
|
lpitem->rect.right = orgX;
|
||||||
lpitem->rect.right = orgX;
|
orgX = lpitem->rect.left;
|
||||||
orgX = lpitem->rect.left;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue