From 5fe54dee09972f36403d2ec034166941e99918ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 19 Jul 2008 17:09:54 +0000 Subject: [PATCH] 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 --- src/kits/interface/Control.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kits/interface/Control.cpp b/src/kits/interface/Control.cpp index 4278288b6e..d293c6c1e7 100644 --- a/src/kits/interface/Control.cpp +++ b/src/kits/interface/Control.cpp @@ -145,6 +145,8 @@ BControl::AttachedToWindow() if (Parent()) { // inherit the color from parent rgb_color color = Parent()->ViewColor(); + if (color == B_TRANSPARENT_COLOR) + color = ui_color(B_PANEL_BACKGROUND_COLOR); SetViewColor(color); SetLowColor(color);