The BStringView is not a BControl but suffered from the same problem in

AttachedToWindow(). Maybe there are more non-BControls yet, I didn't
have a look.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26511 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-07-19 17:49:45 +00:00
parent 5fe54dee09
commit 4f2fc580b8

View File

@ -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);
}