Fixed ComputeLayout(); it added 20 pixel for every item in the list in B_ITEMS_IN_COLUMN.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13477 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-07-06 03:20:31 +00:00
parent c8e986230f
commit 0b4ce825fb
1 changed files with 2 additions and 5 deletions

View File

@ -1257,7 +1257,7 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
item->fBounds.top = frame.bottom;
item->fBounds.bottom = item->fBounds.top + iHeight + fPad.top + fPad.bottom;
frame.right = max_c(frame.right, iWidth + fPad.left + fPad.right) + 20;
frame.right = max_c(frame.right, iWidth + fPad.left + fPad.right + 20);
frame.bottom = item->fBounds.bottom + 1.0f;
}
}
@ -1717,12 +1717,9 @@ void
BMenu::UpdateWindowViewSize(bool upWind)
{
ASSERT(fCachedMenuWindow != NULL);
// TODO: Improve this, we already resize the menu
// in "LayoutItems()"
bool scroll;
BRect frame = CalcFrame(ScreenLocation(), &scroll);
//float width = min_c(Frame().Width(), maxFrame.Width());
ResizeTo(frame.Width(), frame.Height());
fCachedMenuWindow->ResizeTo(Bounds().Width() + 2, Bounds().Height() + 2);