[haiku-commits] r35457 - haiku/trunk/src/kits/interface

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 13 Feb 2010 12:43:01 +0100 (CET)

Author: stippi
Date: 2010-02-13 12:43:01 +0100 (Sat, 13 Feb 2010)
New Revision: 35457
Changeset: http://dev.haiku-os.org/changeset/35457/haiku

Modified:
   haiku/trunk/src/kits/interface/Button.cpp
   haiku/trunk/src/kits/interface/StatusBar.cpp
Log:
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.


Modified: haiku/trunk/src/kits/interface/Button.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Button.cpp   2010-02-12 20:45:08 UTC (rev 
35456)
+++ haiku/trunk/src/kits/interface/Button.cpp   2010-02-13 11:43:01 UTC (rev 
35457)
@@ -105,12 +105,8 @@
 {
        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;

Modified: haiku/trunk/src/kits/interface/StatusBar.cpp
===================================================================
--- haiku/trunk/src/kits/interface/StatusBar.cpp        2010-02-12 20:45:08 UTC 
(rev 35456)
+++ haiku/trunk/src/kits/interface/StatusBar.cpp        2010-02-13 11:43:01 UTC 
(rev 35457)
@@ -278,11 +278,7 @@
 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);


Other related posts:

  • » [haiku-commits] r35457 - haiku/trunk/src/kits/interface - superstippi