Also override MinSize() and PreferredSize().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21464 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -81,7 +81,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// layout related
|
// layout related
|
||||||
|
virtual BSize MinSize();
|
||||||
virtual BSize MaxSize();
|
virtual BSize MaxSize();
|
||||||
|
virtual BSize PreferredSize();
|
||||||
|
|
||||||
/*----- Private or reserved -----------------------------------------*/
|
/*----- Private or reserved -----------------------------------------*/
|
||||||
virtual status_t Perform(perform_code d, void *arg);
|
virtual status_t Perform(perform_code d, void *arg);
|
||||||
|
|||||||
@@ -327,15 +327,26 @@ BMenuBar::Perform(perform_code d, void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BSize
|
||||||
|
BMenuBar::MinSize()
|
||||||
|
{
|
||||||
|
return BMenu::MinSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BSize
|
BSize
|
||||||
BMenuBar::MaxSize()
|
BMenuBar::MaxSize()
|
||||||
{
|
{
|
||||||
// TODO: cache the result
|
BSize size = BMenu::MaxSize();
|
||||||
float width, height;
|
|
||||||
GetPreferredSize(&width, &height);
|
|
||||||
|
|
||||||
return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
|
return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
|
||||||
BSize(B_SIZE_UNLIMITED, height));
|
BSize(B_SIZE_UNLIMITED, size.height));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BSize
|
||||||
|
BMenuBar::PreferredSize()
|
||||||
|
{
|
||||||
|
return BMenu::PreferredSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user