From 6d87a14258ae8e7f06c3131db3fb44f864e7108e Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 6 Mar 2006 13:19:01 +0000 Subject: [PATCH] Take the max content width into account in BMenu::ComputeLayout(). This fixes bug 188. IOW the deskbar expander arrow is now shown git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16603 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Menu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index df14c5b00f..eb6ab778f2 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -1327,6 +1327,9 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems, item->fBounds.bottom = item->fBounds.top + iHeight + fPad.top + fPad.bottom; frame.right = max_c(frame.right, iWidth + fPad.left + fPad.right + 20); + if (fMaxContentWidth > 0) + frame.right = min_c(frame.right, fMaxContentWidth); + frame.bottom = item->fBounds.bottom + 1.0f; } }