Nebula: Set View color in constructor

We don't need to wait for AttachedToWindow for view color
unlike high and low color.
This commit is contained in:
John Scipione
2016-04-13 15:40:23 -07:00
parent a6ab3387c7
commit e5147b1d89
+2 -2
View File
@@ -464,6 +464,8 @@ SettingsView::SettingsView(BRect frame)
: :
BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW) BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW)
{ {
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
BStringView* titleString = new BStringView(B_EMPTY_STRING, BStringView* titleString = new BStringView(B_EMPTY_STRING,
B_TRANSLATE("Nebula")); B_TRANSLATE("Nebula"));
titleString->SetFont(be_bold_font); titleString->SetFont(be_bold_font);
@@ -604,8 +606,6 @@ SettingsView::SettingsView(BRect frame)
void void
SettingsView::AttachedToWindow() SettingsView::AttachedToWindow()
{ {
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
fWidthMenu->Menu()->SetTargetForItems(this); fWidthMenu->Menu()->SetTargetForItems(this);
fColorMenu->Menu()->SetTargetForItems(this); fColorMenu->Menu()->SetTargetForItems(this);
fBorderMenu->Menu()->SetTargetForItems(this); fBorderMenu->Menu()->SetTargetForItems(this);