some adjustments at the menu width calculation. Menus are generally a bit less 'compacted' now. Might need review
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18501 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
509c95da0e
commit
bfb0aa18d3
@ -1525,6 +1525,8 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
|
|||||||
float iWidth, iHeight;
|
float iWidth, iHeight;
|
||||||
BMenuItem *item = NULL;
|
BMenuItem *item = NULL;
|
||||||
|
|
||||||
|
BFont font;
|
||||||
|
GetFont(&font);
|
||||||
switch (fLayout) {
|
switch (fLayout) {
|
||||||
case B_ITEMS_IN_COLUMN:
|
case B_ITEMS_IN_COLUMN:
|
||||||
{
|
{
|
||||||
@ -1534,9 +1536,9 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
|
|||||||
item->GetContentSize(&iWidth, &iHeight);
|
item->GetContentSize(&iWidth, &iHeight);
|
||||||
|
|
||||||
if (item->fModifiers && item->fShortcutChar)
|
if (item->fModifiers && item->fShortcutChar)
|
||||||
iWidth += 25.0f;
|
iWidth += 2 * font.Size();
|
||||||
if (item->fSubmenu != NULL)
|
if (item->fSubmenu != NULL)
|
||||||
iWidth += 20.0f;
|
iWidth += 2 * font.Size();
|
||||||
|
|
||||||
item->fBounds.left = 0.0f;
|
item->fBounds.left = 0.0f;
|
||||||
item->fBounds.top = frame.bottom;
|
item->fBounds.top = frame.bottom;
|
||||||
|
Loading…
Reference in New Issue
Block a user