Skip to content

Commit

Permalink
BStatusBar: Restore the old blue-ish color from before the Set*Color …
Browse files Browse the repository at this point in the history
…changes.
  • Loading branch information
waddlesplash committed Mar 7, 2016
1 parent 361738c commit 80bc632
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions headers/os/interface/InterfaceDefs.h
Expand Up @@ -333,6 +333,8 @@ enum color_which {
B_TOOL_TIP_BACKGROUND_COLOR = 20,
B_TOOL_TIP_TEXT_COLOR = 21,

B_STATUS_BAR_COLOR = 37,

B_SUCCESS_COLOR = 100,
B_FAILURE_COLOR = 101,

Expand Down
2 changes: 1 addition & 1 deletion headers/private/app/ServerReadOnlyMemory.h
Expand Up @@ -15,7 +15,7 @@

// Update kColorWhichLastContinuous with the largest color constant which
// leaves no gaps in the color_which integer values.
static const int32 kColorWhichLastContinuous = B_LINK_ACTIVE_COLOR;
static const int32 kColorWhichLastContinuous = B_STATUS_BAR_COLOR;
static const int32 kColorWhichCount = kColorWhichLastContinuous + 3;
// + 1 for index-offset, + 2 for B_SUCCESS_COLOR, B_FAILURE_COLOR

Expand Down
2 changes: 2 additions & 0 deletions src/kits/interface/InterfaceDefs.cpp
Expand Up @@ -108,6 +108,7 @@ static const rgb_color _kDefaultColors[kColorWhichCount] = {
{102, 152, 203, 255}, // B_LINK_HOVER_COLOR
{145, 112, 155, 255}, // B_LINK_VISITED_COLOR
{121, 142, 203, 255}, // B_LINK_ACTIVE_COLOR
{50, 150, 255, 255}, // B_STATUS_BAR_COLOR
// 100...
{46, 204, 64, 255}, // B_SUCCESS_COLOR
{255, 65, 54, 255}, // B_FAILURE_COLOR
Expand Down Expand Up @@ -153,6 +154,7 @@ static const char* kColorNames[kColorWhichCount] = {
"B_LINK_HOVER_COLOR",
"B_LINK_VISITED_COLOR",
"B_LINK_ACTIVE_COLOR",
"B_STATUS_BAR_COLOR",
// 100...
"B_SUCCESS_COLOR",
"B_FAILURE_COLOR",
Expand Down
12 changes: 6 additions & 6 deletions src/kits/interface/StatusBar.cpp
Expand Up @@ -43,7 +43,7 @@ BStatusBar::BStatusBar(BRect frame, const char *name, const char *label,
BStatusBar::BStatusBar(const char *name, const char *label,
const char *trailingLabel)
:
BView(BRect(0, 0, -1, -1), name, B_FOLLOW_LEFT | B_FOLLOW_TOP,
BView(BRect(0, 0, -1, -1), name, B_FOLLOW_LEFT | B_FOLLOW_TOP,
B_WILL_DRAW | B_SUPPORTS_LAYOUT),
fLabel(label),
fTrailingLabel(trailingLabel)
Expand Down Expand Up @@ -148,7 +148,7 @@ BStatusBar::AttachedToWindow()
fTextDivider = Bounds().Width();

if ((fInternalFlags & kCustomBarColor) == 0)
fBarColor = ui_color(B_CONTROL_MARK_COLOR);
fBarColor = ui_color(B_STATUS_BAR_COLOR);
}


Expand Down Expand Up @@ -234,7 +234,7 @@ BStatusBar::MaxSize()
float width, height;
GetPreferredSize(&width, &height);

return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
BSize(B_SIZE_UNLIMITED, height));
}

Expand Down Expand Up @@ -419,7 +419,7 @@ BStatusBar::MessageReceived(BMessage *message)
break;
}

case B_RESET_STATUS_BAR:
case B_RESET_STATUS_BAR:
{
const char *label = NULL, *trailing_label = NULL;

Expand All @@ -435,7 +435,7 @@ BStatusBar::MessageReceived(BMessage *message)
{
// Change the bar color IF we don't have an application-set color.
if ((fInternalFlags & kCustomBarColor) == 0) {
message->FindColor(ui_color_name(B_CONTROL_MARK_COLOR),
message->FindColor(ui_color_name(B_STATUS_BAR_COLOR),
&fBarColor);
}

Expand Down Expand Up @@ -523,7 +523,7 @@ void
BStatusBar::SetMaxValue(float max)
{
// R5 and/or Zeta's SetMaxValue does not trigger an invalidate here.
// this is probably not ideal behavior, but it does break apps in some cases
// this is probably not ideal behavior, but it does break apps in some cases
// as observed with SpaceMonitor.
// TODO: revisit this when we break binary compatibility
fMax = max;
Expand Down
1 change: 1 addition & 0 deletions src/preferences/appearance/Colors.cpp
Expand Up @@ -64,6 +64,7 @@ static ColorDescription sColorDescriptionTable[] = {
B_TRANSLATE_MARK("Scroll bar thumb") },
{ B_TOOL_TIP_BACKGROUND_COLOR, B_TRANSLATE_MARK("Tooltip background") },
{ B_TOOL_TIP_TEXT_COLOR, B_TRANSLATE_MARK("Tooltip text") },
{ B_STATUS_BAR_COLOR, B_TRANSLATE_MARK("Status bar") },
{ B_SUCCESS_COLOR, B_TRANSLATE_MARK("Success") },
{ B_FAILURE_COLOR, B_TRANSLATE_MARK("Failure") },
{ B_WINDOW_TAB_COLOR, B_TRANSLATE_MARK("Window tab") },
Expand Down

0 comments on commit 80bc632

Please sign in to comment.