From 861e4437b1ff3c09cb746e1fe66a5983ccf59598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 13 Feb 2010 11:43:01 +0000 Subject: [PATCH] If we already figured out the correct low colow to use in AttachedToWindow(), we might as well use it. Couldn't see any regressions so far. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35457 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Button.cpp | 8 ++------ src/kits/interface/StatusBar.cpp | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/kits/interface/Button.cpp b/src/kits/interface/Button.cpp index 6964e8a21a..6f36567fed 100644 --- a/src/kits/interface/Button.cpp +++ b/src/kits/interface/Button.cpp @@ -105,12 +105,8 @@ BButton::Draw(BRect updateRect) { if (be_control_look != NULL) { BRect rect(Bounds()); - rgb_color background = B_TRANSPARENT_COLOR; - if (Parent()) - background = Parent()->ViewColor(); - if (background == B_TRANSPARENT_COLOR) - background = ui_color(B_PANEL_BACKGROUND_COLOR); - rgb_color base = LowColor(); + rgb_color background = LowColor(); + rgb_color base = background; uint32 flags = be_control_look->Flags(this); if (IsDefault()) flags |= BControlLook::B_DEFAULT_BUTTON; diff --git a/src/kits/interface/StatusBar.cpp b/src/kits/interface/StatusBar.cpp index bd5f8eb682..5243a5af5e 100644 --- a/src/kits/interface/StatusBar.cpp +++ b/src/kits/interface/StatusBar.cpp @@ -278,11 +278,7 @@ BStatusBar::FrameResized(float newWidth, float newHeight) void BStatusBar::Draw(BRect updateRect) { - rgb_color backgroundColor; - if (Parent()) - backgroundColor = Parent()->ViewColor(); - else - backgroundColor = ui_color(B_PANEL_BACKGROUND_COLOR); + rgb_color backgroundColor = LowColor(); font_height fontHeight; GetFontHeight(&fontHeight);