BMenuField's private menu bar did not take into account the width of the popup indicator when computing its minimum size. Fixes ticket #3635.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32171 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2009-08-06 23:24:48 +00:00
parent 22d0f12de3
commit 102a66c3f6
2 changed files with 11 additions and 0 deletions

View File

@ -54,6 +54,7 @@ public:
bool IsPopUpMarkerShown() const
{ return fShowPopUpMarker; }
virtual BSize MinSize();
virtual BSize MaxSize();
private:

View File

@ -362,6 +362,16 @@ _BMCMenuBar_::MakeFocus(bool focused)
}
BSize
_BMCMenuBar_::MinSize()
{
BSize size;
BMenuBar::GetPreferredSize(&size.width, &size.height);
// account for popup indicator + a few pixels margin
size.width += 13.0;
return BLayoutUtils::ComposeSize(ExplicitMinSize(), size);
}
BSize
_BMCMenuBar_::MaxSize()
{