Reverted r21395. Many people didn't like the change, and after all I too

think it wasn't a really good idea. The alignment of shortcut 
charachters and submenu symbols could use some more work, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22849 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-11-07 09:38:55 +00:00
parent 0aded81728
commit afd60167e3
3 changed files with 5 additions and 13 deletions

View File

@ -259,7 +259,7 @@ private:
LayoutData* fLayoutData;
int32 fSubmenus;
int32 _reserved;
char fTrigger;
bool fResizeToFit;

View File

@ -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;

View File

@ -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: