From 0b4ce825fbfadb81779d4c8e17db2940b82e7b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 6 Jul 2005 03:20:31 +0000 Subject: [PATCH] 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 --- src/kits/interface/Menu.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index ee861328ec..7f99d0e1ce 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -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);