user: Fix the keyboard navigation and some graphical glitches for multi-column menus.
This commit is contained in:
parent
aa45d8aeb3
commit
21750e2717
|
@ -524,7 +524,7 @@ static UINT MENU_GetStartOfNextColumn(
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
for( ; i < menu->nItems; ++i ) {
|
for( ; i < menu->nItems; ++i ) {
|
||||||
if (menu->items[i].fType & MF_MENUBARBREAK)
|
if (menu->items[i].fType & (MF_MENUBREAK | MF_MENUBARBREAK))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,14 +554,14 @@ static UINT MENU_GetStartOfPrevColumn(
|
||||||
/* Find the start of the column */
|
/* Find the start of the column */
|
||||||
|
|
||||||
for(i = menu->FocusedItem; i != 0 &&
|
for(i = menu->FocusedItem; i != 0 &&
|
||||||
!(menu->items[i].fType & MF_MENUBARBREAK);
|
!(menu->items[i].fType & (MF_MENUBREAK | MF_MENUBARBREAK));
|
||||||
--i); /* empty */
|
--i); /* empty */
|
||||||
|
|
||||||
if(i == 0)
|
if(i == 0)
|
||||||
return NO_SELECTED_ITEM;
|
return NO_SELECTED_ITEM;
|
||||||
|
|
||||||
for(--i; i != 0; --i) {
|
for(--i; i != 0; --i) {
|
||||||
if (menu->items[i].fType & MF_MENUBARBREAK)
|
if (menu->items[i].fType & (MF_MENUBREAK | MF_MENUBARBREAK))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1131,7 +1131,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
|
||||||
{
|
{
|
||||||
lpitem = &lppop->items[start];
|
lpitem = &lppop->items[start];
|
||||||
orgX = maxX;
|
orgX = maxX;
|
||||||
if( lpitem->fType & MF_MENUBREAK)
|
if( lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))
|
||||||
orgX += MENU_COL_SPACE;
|
orgX += MENU_COL_SPACE;
|
||||||
orgY = MENU_TOP_MARGIN;
|
orgY = MENU_TOP_MARGIN;
|
||||||
|
|
||||||
|
@ -1143,8 +1143,6 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
|
||||||
(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
|
(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
|
||||||
|
|
||||||
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, FALSE, lppop );
|
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, FALSE, lppop );
|
||||||
|
|
||||||
if (lpitem->fType & MF_MENUBARBREAK) orgX++;
|
|
||||||
maxX = max( maxX, lpitem->rect.right );
|
maxX = max( maxX, lpitem->rect.right );
|
||||||
orgY = lpitem->rect.bottom;
|
orgY = lpitem->rect.bottom;
|
||||||
if (IS_STRING_ITEM(lpitem->fType) && lpitem->xTab)
|
if (IS_STRING_ITEM(lpitem->fType) && lpitem->xTab)
|
||||||
|
@ -1457,6 +1455,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
HPEN oldPen;
|
HPEN oldPen;
|
||||||
RECT rc = rect;
|
RECT rc = rect;
|
||||||
|
|
||||||
|
rc.left -= MENU_COL_SPACE / 2 + 1;
|
||||||
rc.top = 3;
|
rc.top = 3;
|
||||||
rc.bottom = height - 3;
|
rc.bottom = height - 3;
|
||||||
if (flat_menu)
|
if (flat_menu)
|
||||||
|
|
Loading…
Reference in New Issue