diff --git a/src/kits/interface/StringView.cpp b/src/kits/interface/StringView.cpp index 1aecc0e4b7..1eee366911 100644 --- a/src/kits/interface/StringView.cpp +++ b/src/kits/interface/StringView.cpp @@ -131,8 +131,16 @@ BStringView::Alignment() const void BStringView::AttachedToWindow() { - if (Parent()) - SetViewColor(Parent()->ViewColor()); + rgb_color color = B_TRANSPARENT_COLOR; + + BView* parent = Parent(); + if (parent != NULL) + color = parent->ViewColor(); + + if (color == B_TRANSPARENT_COLOR) + color = ui_color(B_PANEL_BACKGROUND_COLOR); + + SetViewColor(color); }