diff --git a/headers/os/interface/Menu.h b/headers/os/interface/Menu.h index 1d97e87b8a..8d187aeaee 100644 --- a/headers/os/interface/Menu.h +++ b/headers/os/interface/Menu.h @@ -259,7 +259,7 @@ private: LayoutData* fLayoutData; - int32 fSubmenus; + int32 _reserved; char fTrigger; bool fResizeToFit; diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 076aa8a7ba..9550d5496c 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -189,7 +189,6 @@ BMenu::BMenu(const char *name, menu_layout layout) fMaxContentWidth(0.0f), fInitMatrixSize(NULL), fExtraMenuData(NULL), - fSubmenus(0), fTrigger(0), fResizeToFit(true), fUseCachedMenuLayout(false), @@ -223,7 +222,6 @@ BMenu::BMenu(const char *name, float width, float height) fMaxContentWidth(0.0f), fInitMatrixSize(NULL), fExtraMenuData(NULL), - fSubmenus(0), fTrigger(0), fResizeToFit(true), fUseCachedMenuLayout(false), @@ -270,7 +268,6 @@ BMenu::BMenu(BMessage *archive) fMaxContentWidth(0.0f), fInitMatrixSize(NULL), fExtraMenuData(NULL), - fSubmenus(0), fTrigger(0), fResizeToFit(true), fUseCachedMenuLayout(false), @@ -1089,7 +1086,6 @@ BMenu::BMenu(BRect frame, const char *name, uint32 resizingMode, uint32 flags, fMaxContentWidth(0.0f), fInitMatrixSize(NULL), fExtraMenuData(NULL), - fSubmenus(0), fTrigger(0), fResizeToFit(resizeToFit), fUseCachedMenuLayout(false), @@ -1734,8 +1730,7 @@ BMenu::_ComputeColumnLayout(int32 index, bool bestFit, bool moveItems, item->fBounds.bottom = item->fBounds.top + iHeight + fPad.top + fPad.bottom; - if (fSubmenus) - iWidth += item->Frame().Height(); + iWidth += item->Frame().Height(); frame.right = max_c(frame.right, iWidth + fPad.left + fPad.right); frame.bottom = item->fBounds.bottom + 1.0f; diff --git a/src/kits/interface/MenuItem.cpp b/src/kits/interface/MenuItem.cpp index 93ed8c02bf..7098b776b2 100644 --- a/src/kits/interface/MenuItem.cpp +++ b/src/kits/interface/MenuItem.cpp @@ -640,10 +640,6 @@ BMenuItem::SetSuper(BMenu *super) debugger("Error - can't add menu or menu item to more than 1 container (either menu or menubar)."); if (fSubmenu != NULL) { - if (super) - super->fSubmenus++; - else if (fSuper) - fSuper->fSubmenus--; fSubmenu->fSuper = super; } @@ -715,8 +711,9 @@ BMenuItem::_DrawShortcutSymbol() menu->GetFont(&font); BPoint where = ContentLocation(); where.x = fBounds.right - font.Size(); - if (menu->fSubmenus) - where.x -= fBounds.Height() - 4; + + if (fSubmenu) + where.x -= fBounds.Height() - 3; switch (fShortcutChar) { case B_DOWN_ARROW: