From 49b154d166545327c55c0a7b32a68db828d0987a Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Wed, 8 Mar 2006 23:15:47 +0000 Subject: [PATCH] Fixed wrong calculation of the menu frame if layout is B_ITEMS_IN_ROW. Fixes bug 209 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16667 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Menu.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 6d8b9df5af..52432a376e 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -1345,8 +1345,7 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems, { font_height fh; GetFontHeight(&fh); - frame = BRect(0.0f, 0.0f, 0.0f, - ceilf(fh.ascent) + ceilf(fh.descent) + fPad.top + fPad.bottom); + frame = BRect(0.0f, 0.0f, 0.0f, ceilf(fh.ascent + fh.descent + fPad.top + fPad.bottom)); for (int32 i = 0; i < fItems.CountItems(); i++) { item = ItemAt(i); @@ -1364,8 +1363,8 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems, for (int32 i = 0; i < fItems.CountItems(); i++) ItemAt(i)->fBounds.bottom = frame.bottom; - - frame.right = ceilf(frame.right) + 8.0f; + + frame.right = ceilf(frame.right);// + 8.0f; break; }