BToolBar: Use MENU_BACKGROUND color, and leave buttons with default.
Toolbars go with menu bars, and so to blend in better with them, should use the same colors. (Under the default color schemes, the menu bar and panel colors are the same, so this makes no visible difference there.) Added a TODO for button colors as we may want to do something different for that, it also makes no difference with the default scheme, but for non-default schemes may matter. Improves #19629.
This commit is contained in:
@@ -15,7 +15,7 @@ namespace BPrivate {
|
||||
|
||||
|
||||
|
||||
// Button to adopt backgrond color of toolbar
|
||||
//! Button to adopt background color of BToolBar
|
||||
class ToolBarButton : public BButton {
|
||||
public:
|
||||
ToolBarButton(const char* name, const char* label,
|
||||
@@ -29,23 +29,23 @@ ToolBarButton::ToolBarButton(const char* name, const char* label,
|
||||
BMessage* message)
|
||||
:
|
||||
BButton(name, label, message)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ToolBarButton::AttachedToWindow()
|
||||
{
|
||||
BButton::AttachedToWindow();
|
||||
SetLowUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
// have to remove the darkening caused by BButton's drawing
|
||||
|
||||
// TODO: Should we force Control, Menu, or parent colors here?
|
||||
}
|
||||
|
||||
|
||||
//# pragma mark -
|
||||
// # pragma mark -
|
||||
|
||||
|
||||
class LockableButton: public ToolBarButton {
|
||||
class LockableButton : public ToolBarButton {
|
||||
public:
|
||||
LockableButton(const char* name, const char* label,
|
||||
BMessage* message);
|
||||
@@ -220,6 +220,7 @@ BToolBar::FindButton(uint32 command) const
|
||||
|
||||
// #pragma mark - Private methods
|
||||
|
||||
|
||||
void
|
||||
BToolBar::Pulse()
|
||||
{
|
||||
@@ -247,6 +248,9 @@ BToolBar::_Init()
|
||||
GroupLayout()->SetSpacing(1);
|
||||
|
||||
SetFlags(Flags() | B_FRAME_EVENTS | B_PULSE_NEEDED);
|
||||
|
||||
SetLowUIColor(B_MENU_BACKGROUND_COLOR);
|
||||
SetViewUIColor(B_MENU_BACKGROUND_COLOR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ BNavigator::BNavigator(const Model* model)
|
||||
|
||||
// Needed to draw the bottom border
|
||||
SetFlags(Flags() | B_WILL_DRAW);
|
||||
SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +84,8 @@ BNavigator::~BNavigator()
|
||||
void
|
||||
BNavigator::AttachedToWindow()
|
||||
{
|
||||
BToolBar::AttachedToWindow();
|
||||
|
||||
const BRect iconRect(BPoint(0, 0),
|
||||
be_control_look->ComposeIconSize(20));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user