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:
@@ -259,7 +259,7 @@ private:
|
|||||||
|
|
||||||
LayoutData* fLayoutData;
|
LayoutData* fLayoutData;
|
||||||
|
|
||||||
int32 fSubmenus;
|
int32 _reserved;
|
||||||
|
|
||||||
char fTrigger;
|
char fTrigger;
|
||||||
bool fResizeToFit;
|
bool fResizeToFit;
|
||||||
|
|||||||
@@ -189,7 +189,6 @@ BMenu::BMenu(const char *name, menu_layout layout)
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fSubmenus(0),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(true),
|
fResizeToFit(true),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -223,7 +222,6 @@ BMenu::BMenu(const char *name, float width, float height)
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fSubmenus(0),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(true),
|
fResizeToFit(true),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -270,7 +268,6 @@ BMenu::BMenu(BMessage *archive)
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fSubmenus(0),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(true),
|
fResizeToFit(true),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -1089,7 +1086,6 @@ BMenu::BMenu(BRect frame, const char *name, uint32 resizingMode, uint32 flags,
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fSubmenus(0),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(resizeToFit),
|
fResizeToFit(resizeToFit),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -1734,8 +1730,7 @@ BMenu::_ComputeColumnLayout(int32 index, bool bestFit, bool moveItems,
|
|||||||
item->fBounds.bottom = item->fBounds.top + iHeight + fPad.top
|
item->fBounds.bottom = item->fBounds.top + iHeight + fPad.top
|
||||||
+ fPad.bottom;
|
+ fPad.bottom;
|
||||||
|
|
||||||
if (fSubmenus)
|
iWidth += item->Frame().Height();
|
||||||
iWidth += item->Frame().Height();
|
|
||||||
|
|
||||||
frame.right = max_c(frame.right, iWidth + fPad.left + fPad.right);
|
frame.right = max_c(frame.right, iWidth + fPad.left + fPad.right);
|
||||||
frame.bottom = item->fBounds.bottom + 1.0f;
|
frame.bottom = item->fBounds.bottom + 1.0f;
|
||||||
|
|||||||
@@ -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).");
|
debugger("Error - can't add menu or menu item to more than 1 container (either menu or menubar).");
|
||||||
|
|
||||||
if (fSubmenu != NULL) {
|
if (fSubmenu != NULL) {
|
||||||
if (super)
|
|
||||||
super->fSubmenus++;
|
|
||||||
else if (fSuper)
|
|
||||||
fSuper->fSubmenus--;
|
|
||||||
fSubmenu->fSuper = super;
|
fSubmenu->fSuper = super;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -715,8 +711,9 @@ BMenuItem::_DrawShortcutSymbol()
|
|||||||
menu->GetFont(&font);
|
menu->GetFont(&font);
|
||||||
BPoint where = ContentLocation();
|
BPoint where = ContentLocation();
|
||||||
where.x = fBounds.right - font.Size();
|
where.x = fBounds.right - font.Size();
|
||||||
if (menu->fSubmenus)
|
|
||||||
where.x -= fBounds.Height() - 4;
|
if (fSubmenu)
|
||||||
|
where.x -= fBounds.Height() - 3;
|
||||||
|
|
||||||
switch (fShortcutChar) {
|
switch (fShortcutChar) {
|
||||||
case B_DOWN_ARROW:
|
case B_DOWN_ARROW:
|
||||||
|
|||||||
Reference in New Issue
Block a user