diff --git a/src/kits/interface/Button.cpp b/src/kits/interface/Button.cpp index 68b2884cc8..ab728e5355 100644 --- a/src/kits/interface/Button.cpp +++ b/src/kits/interface/Button.cpp @@ -132,14 +132,11 @@ BButton::Archive(BMessage* data, bool deep) const void BButton::Draw(BRect updateRect) { - // Allow improved customization & integration - float buttonTint = B_DARKEN_1_TINT; - if (ViewUIColor() != B_CONTROL_BACKGROUND_COLOR) - buttonTint = B_NO_TINT; - BRect rect(Bounds()); rgb_color background = LowColor(); - rgb_color base = tint_color(ViewColor(), buttonTint); + + // Darken default control color to match default panel color. + rgb_color base = tint_color(ui_color(B_CONTROL_BACKGROUND_COLOR), 1.115); uint32 flags = be_control_look->Flags(this); if (_Flag(FLAG_DEFAULT)) flags |= BControlLook::B_DEFAULT_BUTTON; @@ -232,18 +229,6 @@ void BButton::AttachedToWindow() { BControl::AttachedToWindow(); - SetViewUIColor(B_CONTROL_BACKGROUND_COLOR); - - // Ensure BButton's low color is the parent's VIEW color. - // We don't want to adopt the standard control lowcolor. - if (Parent() != NULL) { - float tint = B_NO_TINT; - color_which which = ViewUIColor(&tint); - if (which != B_NO_COLOR) - SetLowUIColor(which, tint); - else - SetLowColor(ViewColor()); - } if (IsDefault()) Window()->SetDefaultButton(this); diff --git a/src/kits/interface/Control.cpp b/src/kits/interface/Control.cpp index 1882e8bf7a..3009da4593 100644 --- a/src/kits/interface/Control.cpp +++ b/src/kits/interface/Control.cpp @@ -153,8 +153,10 @@ BControl::AttachedToWindow() { AdoptParentColors(); - if (ViewColor() == B_TRANSPARENT_COLOR) - SetViewUIColor(B_PANEL_BACKGROUND_COLOR); + if (ViewColor() == B_TRANSPARENT_COLOR + || Parent() == NULL) { + AdoptSystemColors(); + } // Force view color as low color if (Parent() != NULL) { diff --git a/src/kits/interface/ControlLook.cpp b/src/kits/interface/ControlLook.cpp index dfeb6e3fb5..e4c3152518 100644 --- a/src/kits/interface/ControlLook.cpp +++ b/src/kits/interface/ControlLook.cpp @@ -2159,10 +2159,7 @@ BControlLook::_DrawButtonFrame(BView* view, BRect& rect, brightness * ((flags & B_DISABLED) != 0 ? 1.0 : 0.9), flags); // draw default button indicator - view->SetHighColor(background); - view->FillRect(rect); - view->SetHighColor(base); - view->StrokeRoundRect(rect, leftTopRadius, leftTopRadius); + // Allow a 1-pixel border of the background to come through. rect.InsetBy(1, 1); view->SetHighColor(defaultIndicatorColor);