Style fixes to BMenuField

Rename resize to resizingMode, whitespace fixes, compare to 0 explicitly
This commit is contained in:
John Scipione
2013-05-09 21:29:12 -04:00
parent 935599c53f
commit df5d08a718
2 changed files with 20 additions and 19 deletions
+4 -2
View File
@@ -16,12 +16,14 @@ class BMenuField : public BView {
public: public:
BMenuField(BRect frame, const char* name, BMenuField(BRect frame, const char* name,
const char* label, BMenu* menu, const char* label, BMenu* menu,
uint32 resize = B_FOLLOW_LEFT|B_FOLLOW_TOP, uint32 resizingMode = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE); uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BMenuField(BRect frame, const char* name, BMenuField(BRect frame, const char* name,
const char* label, BMenu* menu, const char* label, BMenu* menu,
bool fixed_size, bool fixed_size,
uint32 resize = B_FOLLOW_LEFT|B_FOLLOW_TOP, uint32 resizingMode = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
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,
+6 -7
View File
@@ -135,9 +135,9 @@ static float kVMargin = 2.0f;
BMenuField::BMenuField(BRect frame, const char* name, const char* label, BMenuField::BMenuField(BRect frame, const char* name, const char* label,
BMenu* menu, uint32 resize, uint32 flags) BMenu* menu, uint32 resizingMode, uint32 flags)
: :
BView(frame, name, resize, flags) BView(frame, name, resizingMode, flags)
{ {
CALLED(); CALLED();
@@ -153,9 +153,9 @@ BMenuField::BMenuField(BRect frame, const char* name, const char* label,
BMenuField::BMenuField(BRect frame, const char* name, const char* label, BMenuField::BMenuField(BRect frame, const char* name, const char* label,
BMenu* menu, bool fixedSize, uint32 resize, uint32 flags) BMenu* menu, bool fixedSize, uint32 resizingMode, uint32 flags)
: :
BView(frame, name, resize, flags) BView(frame, name, resizingMode, flags)
{ {
InitObject(label); InitObject(label);
@@ -637,7 +637,7 @@ BMenuField::SetDivider(float divider)
fDivider = divider; fDivider = divider;
if (Flags() & B_SUPPORTS_LAYOUT) { if ((Flags() & B_SUPPORTS_LAYOUT) != 0) {
// We should never get here, since layout support means, we also // We should never get here, since layout support means, we also
// layout the divider, and don't use this method at all. // layout the divider, and don't use this method at all.
Relayout(); Relayout();
@@ -882,7 +882,7 @@ void
BMenuField::DoLayout() BMenuField::DoLayout()
{ {
// Bail out, if we shan't do layout. // Bail out, if we shan't do layout.
if (!(Flags() & B_SUPPORTS_LAYOUT)) if ((Flags() & B_SUPPORTS_LAYOUT) == 0)
return; return;
CALLED(); CALLED();
@@ -1137,7 +1137,6 @@ BMenuField::_InitMenuBar(BMenu* menu, BRect frame, bool fixedSize)
AddChild(fMenuBar); AddChild(fMenuBar);
fMenuBar->AddItem(menu); fMenuBar->AddItem(menu);
fMenuBar->SetFont(be_plain_font); fMenuBar->SetFont(be_plain_font);
} }