* 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:
@@ -27,7 +27,7 @@ public:
|
|||||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
||||||
BMenuField(const char* name,
|
BMenuField(const char* name,
|
||||||
const char* label, BMenu* menu,
|
const char* label, BMenu* menu,
|
||||||
BMessage* message,
|
BMessage* message = NULL,
|
||||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
||||||
BMenuField(const char* label,
|
BMenuField(const char* label,
|
||||||
BMenu* menu, BMessage* message = NULL);
|
BMenu* menu, BMessage* message = NULL);
|
||||||
|
|||||||
@@ -184,7 +184,8 @@ struct BMenu::LayoutData {
|
|||||||
|
|
||||||
|
|
||||||
BMenu::BMenu(const char* name, menu_layout layout)
|
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),
|
fChosenItem(NULL),
|
||||||
fPad(14.0f, 2.0f, 20.0f, 0.0f),
|
fPad(14.0f, 2.0f, 20.0f, 0.0f),
|
||||||
fSelected(NULL),
|
fSelected(NULL),
|
||||||
@@ -218,7 +219,8 @@ BMenu::BMenu(const char* name, menu_layout layout)
|
|||||||
|
|
||||||
|
|
||||||
BMenu::BMenu(const char* name, float width, float height)
|
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),
|
fChosenItem(NULL),
|
||||||
fSelected(NULL),
|
fSelected(NULL),
|
||||||
fCachedMenuWindow(NULL),
|
fCachedMenuWindow(NULL),
|
||||||
@@ -263,7 +265,8 @@ BMenu::~BMenu()
|
|||||||
|
|
||||||
|
|
||||||
BMenu::BMenu(BMessage* archive)
|
BMenu::BMenu(BMessage* archive)
|
||||||
: BView(archive),
|
:
|
||||||
|
BView(archive),
|
||||||
fChosenItem(NULL),
|
fChosenItem(NULL),
|
||||||
fPad(14.0f, 2.0f, 20.0f, 0.0f),
|
fPad(14.0f, 2.0f, 20.0f, 0.0f),
|
||||||
fSelected(NULL),
|
fSelected(NULL),
|
||||||
|
|||||||
@@ -1136,8 +1136,9 @@ BMenuField::_MenuBarWidth() const
|
|||||||
|
|
||||||
|
|
||||||
BMenuField::LabelLayoutItem::LabelLayoutItem(BMenuField* parent)
|
BMenuField::LabelLayoutItem::LabelLayoutItem(BMenuField* parent)
|
||||||
: fParent(parent),
|
:
|
||||||
fFrame()
|
fParent(parent),
|
||||||
|
fFrame()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1216,8 +1217,9 @@ BMenuField::LabelLayoutItem::BaseAlignment()
|
|||||||
|
|
||||||
|
|
||||||
BMenuField::MenuBarLayoutItem::MenuBarLayoutItem(BMenuField* parent)
|
BMenuField::MenuBarLayoutItem::MenuBarLayoutItem(BMenuField* parent)
|
||||||
: fParent(parent),
|
:
|
||||||
fFrame()
|
fParent(parent),
|
||||||
|
fFrame()
|
||||||
{
|
{
|
||||||
// by default the part right of the divider shall have an unlimited maximum
|
// by default the part right of the divider shall have an unlimited maximum
|
||||||
// width
|
// width
|
||||||
@@ -1286,10 +1288,7 @@ BMenuField::MenuBarLayoutItem::BaseMaxSize()
|
|||||||
BSize
|
BSize
|
||||||
BMenuField::MenuBarLayoutItem::BasePreferredSize()
|
BMenuField::MenuBarLayoutItem::BasePreferredSize()
|
||||||
{
|
{
|
||||||
BSize size(BaseMinSize());
|
return BaseMinSize();
|
||||||
// puh, no idea...
|
|
||||||
size.width = 100;
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user