If the parent view color is B_TRANSPARENT_COLOR,
fallback to ui_color(B_PANEL_BACKGROUND_COLOR) in AttachedToWindow(). Most controls don't paint their background and rely on the app_server painting it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26510 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -145,6 +145,8 @@ BControl::AttachedToWindow()
|
|||||||
if (Parent()) {
|
if (Parent()) {
|
||||||
// inherit the color from parent
|
// inherit the color from parent
|
||||||
rgb_color color = Parent()->ViewColor();
|
rgb_color color = Parent()->ViewColor();
|
||||||
|
if (color == B_TRANSPARENT_COLOR)
|
||||||
|
color = ui_color(B_PANEL_BACKGROUND_COLOR);
|
||||||
|
|
||||||
SetViewColor(color);
|
SetViewColor(color);
|
||||||
SetLowColor(color);
|
SetLowColor(color);
|
||||||
|
|||||||
Reference in New Issue
Block a user