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
This commit is contained in:
@@ -1345,8 +1345,7 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
|
|||||||
{
|
{
|
||||||
font_height fh;
|
font_height fh;
|
||||||
GetFontHeight(&fh);
|
GetFontHeight(&fh);
|
||||||
frame = BRect(0.0f, 0.0f, 0.0f,
|
frame = BRect(0.0f, 0.0f, 0.0f, ceilf(fh.ascent + fh.descent + fPad.top + fPad.bottom));
|
||||||
ceilf(fh.ascent) + ceilf(fh.descent) + fPad.top + fPad.bottom);
|
|
||||||
|
|
||||||
for (int32 i = 0; i < fItems.CountItems(); i++) {
|
for (int32 i = 0; i < fItems.CountItems(); i++) {
|
||||||
item = ItemAt(i);
|
item = ItemAt(i);
|
||||||
@@ -1364,8 +1363,8 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
|
|||||||
|
|
||||||
for (int32 i = 0; i < fItems.CountItems(); i++)
|
for (int32 i = 0; i < fItems.CountItems(); i++)
|
||||||
ItemAt(i)->fBounds.bottom = frame.bottom;
|
ItemAt(i)->fBounds.bottom = frame.bottom;
|
||||||
|
|
||||||
frame.right = ceilf(frame.right) + 8.0f;
|
frame.right = ceilf(frame.right);// + 8.0f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user