When calculating the menu frame, take the resizeToFit parameter into account. This fixes bug 574, although the implementation isn't probably completed yet. Needs more investigation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18459 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-08-08 14:07:09 +00:00
parent 43e03d5827
commit b6bf3346f3
+4 -3
View File
@@ -329,6 +329,7 @@ BMenu::AttachedToWindow()
if (!fAttachAborted) {
CacheFontInfo();
LayoutItems(0);
//UpdateWindowViewSize();
}
}
@@ -1582,7 +1583,10 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
ItemAt(i)->fBounds.bottom = frame.bottom;
}
if (bestFit)
frame.right = ceilf(frame.right);
else
frame.right = Bounds().right;
break;
}
@@ -2066,9 +2070,6 @@ void
BMenu::UpdateWindowViewSize(bool upWind)
{
BWindow *window = Window();
ASSERT(window != NULL);
if (window == NULL)
return;