Tracker: MiniMenuField style fixes

This commit is contained in:
John Scipione
2014-06-20 21:02:00 -04:00
parent 90da025732
commit 40ef04f38e
2 changed files with 10 additions and 7 deletions
+4 -3
View File
@@ -44,7 +44,8 @@ All rights reserved.
MiniMenuField::MiniMenuField(BRect frame, const char* name, BPopUpMenu* menu, MiniMenuField::MiniMenuField(BRect frame, const char* name, BPopUpMenu* menu,
uint32 resizeFlags, uint32 flags) uint32 resizeFlags, uint32 flags)
: BView(frame, name, resizeFlags, flags), :
BView(frame, name, resizeFlags, flags),
fMenu(menu) fMenu(menu)
{ {
SetFont(be_plain_font, B_FONT_FAMILY_AND_STYLE | B_FONT_SIZE); SetFont(be_plain_font, B_FONT_FAMILY_AND_STYLE | B_FONT_SIZE);
@@ -60,10 +61,11 @@ MiniMenuField::~MiniMenuField()
void void
MiniMenuField::AttachedToWindow() MiniMenuField::AttachedToWindow()
{ {
if (Parent()) { if (Parent() != NULL) {
SetViewColor(Parent()->ViewColor()); SetViewColor(Parent()->ViewColor());
SetLowColor(Parent()->ViewColor()); SetLowColor(Parent()->ViewColor());
} }
SetHighColor(0, 0, 0); SetHighColor(0, 0, 0);
} }
@@ -150,4 +152,3 @@ MiniMenuField::MouseDown(BPoint)
{ {
fMenu->Go(ConvertToScreen(BPoint(4, 4)), true); fMenu->Go(ConvertToScreen(BPoint(4, 4)), true);
} }
+5 -3
View File
@@ -31,8 +31,8 @@ of Be Incorporated in the United States and other countries. Other brand product
names are registered trademarks or trademarks of their respective holders. names are registered trademarks or trademarks of their respective holders.
All rights reserved. All rights reserved.
*/ */
#ifndef __MINI_MENU_FIELD__ #ifndef _MINI_MENU_FIELD_H
#define __MINI_MENU_FIELD__ #define _MINI_MENU_FIELD_H
#include <View.h> #include <View.h>
@@ -40,6 +40,7 @@ All rights reserved.
class BPopUpMenu; class BPopUpMenu;
namespace BPrivate { namespace BPrivate {
class MiniMenuField : public BView { class MiniMenuField : public BView {
@@ -67,4 +68,5 @@ private:
using namespace BPrivate; using namespace BPrivate;
#endif // __MINI_MENU_FIELD__
#endif // _MINI_MENU_FIELD_H