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:
@@ -329,6 +329,7 @@ BMenu::AttachedToWindow()
|
|||||||
if (!fAttachAborted) {
|
if (!fAttachAborted) {
|
||||||
CacheFontInfo();
|
CacheFontInfo();
|
||||||
LayoutItems(0);
|
LayoutItems(0);
|
||||||
|
//UpdateWindowViewSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1582,7 +1583,10 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
|
|||||||
ItemAt(i)->fBounds.bottom = frame.bottom;
|
ItemAt(i)->fBounds.bottom = frame.bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.right = ceilf(frame.right);
|
if (bestFit)
|
||||||
|
frame.right = ceilf(frame.right);
|
||||||
|
else
|
||||||
|
frame.right = Bounds().right;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2066,9 +2070,6 @@ void
|
|||||||
BMenu::UpdateWindowViewSize(bool upWind)
|
BMenu::UpdateWindowViewSize(bool upWind)
|
||||||
{
|
{
|
||||||
BWindow *window = Window();
|
BWindow *window = Window();
|
||||||
|
|
||||||
ASSERT(window != NULL);
|
|
||||||
|
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user