* Added missing default initializer for the message.

* Changed BMenuField::MenuBarLayoutItem::BasePreferredSize() to return the
  min size as well, instead of a fixed 100 pixels for the width...
* More minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32177 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-08-07 08:52:32 +00:00
parent f99cba9e57
commit 12194e33b7
3 changed files with 14 additions and 12 deletions

View File

@ -27,7 +27,7 @@ public:
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BMenuField(const char* name,
const char* label, BMenu* menu,
BMessage* message,
BMessage* message = NULL,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BMenuField(const char* label,
BMenu* menu, BMessage* message = NULL);

View File

@ -184,7 +184,8 @@ struct BMenu::LayoutData {
BMenu::BMenu(const char* name, menu_layout layout)
: BView(BRect(0, 0, 0, 0), name, 0, B_WILL_DRAW),
:
BView(BRect(0, 0, 0, 0), name, 0, B_WILL_DRAW),
fChosenItem(NULL),
fPad(14.0f, 2.0f, 20.0f, 0.0f),
fSelected(NULL),
@ -218,7 +219,8 @@ BMenu::BMenu(const char* name, menu_layout layout)
BMenu::BMenu(const char* name, float width, float height)
: BView(BRect(0.0f, width, 0.0f, height), name, 0, B_WILL_DRAW),
:
BView(BRect(0.0f, width, 0.0f, height), name, 0, B_WILL_DRAW),
fChosenItem(NULL),
fSelected(NULL),
fCachedMenuWindow(NULL),
@ -263,7 +265,8 @@ BMenu::~BMenu()
BMenu::BMenu(BMessage* archive)
: BView(archive),
:
BView(archive),
fChosenItem(NULL),
fPad(14.0f, 2.0f, 20.0f, 0.0f),
fSelected(NULL),

View File

@ -1136,8 +1136,9 @@ BMenuField::_MenuBarWidth() const
BMenuField::LabelLayoutItem::LabelLayoutItem(BMenuField* parent)
: fParent(parent),
fFrame()
:
fParent(parent),
fFrame()
{
}
@ -1216,8 +1217,9 @@ BMenuField::LabelLayoutItem::BaseAlignment()
BMenuField::MenuBarLayoutItem::MenuBarLayoutItem(BMenuField* parent)
: fParent(parent),
fFrame()
:
fParent(parent),
fFrame()
{
// by default the part right of the divider shall have an unlimited maximum
// width
@ -1286,10 +1288,7 @@ BMenuField::MenuBarLayoutItem::BaseMaxSize()
BSize
BMenuField::MenuBarLayoutItem::BasePreferredSize()
{
BSize size(BaseMinSize());
// puh, no idea...
size.width = 100;
return size;
return BaseMinSize();
}