BStatusBar: Restore the old blue-ish color from before the Set*Color changes.
This commit is contained in:
@@ -333,6 +333,8 @@ enum color_which {
|
|||||||
B_TOOL_TIP_BACKGROUND_COLOR = 20,
|
B_TOOL_TIP_BACKGROUND_COLOR = 20,
|
||||||
B_TOOL_TIP_TEXT_COLOR = 21,
|
B_TOOL_TIP_TEXT_COLOR = 21,
|
||||||
|
|
||||||
|
B_STATUS_BAR_COLOR = 37,
|
||||||
|
|
||||||
B_SUCCESS_COLOR = 100,
|
B_SUCCESS_COLOR = 100,
|
||||||
B_FAILURE_COLOR = 101,
|
B_FAILURE_COLOR = 101,
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
// Update kColorWhichLastContinuous with the largest color constant which
|
// Update kColorWhichLastContinuous with the largest color constant which
|
||||||
// leaves no gaps in the color_which integer values.
|
// 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;
|
static const int32 kColorWhichCount = kColorWhichLastContinuous + 3;
|
||||||
// + 1 for index-offset, + 2 for B_SUCCESS_COLOR, B_FAILURE_COLOR
|
// + 1 for index-offset, + 2 for B_SUCCESS_COLOR, B_FAILURE_COLOR
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ static const rgb_color _kDefaultColors[kColorWhichCount] = {
|
|||||||
{102, 152, 203, 255}, // B_LINK_HOVER_COLOR
|
{102, 152, 203, 255}, // B_LINK_HOVER_COLOR
|
||||||
{145, 112, 155, 255}, // B_LINK_VISITED_COLOR
|
{145, 112, 155, 255}, // B_LINK_VISITED_COLOR
|
||||||
{121, 142, 203, 255}, // B_LINK_ACTIVE_COLOR
|
{121, 142, 203, 255}, // B_LINK_ACTIVE_COLOR
|
||||||
|
{50, 150, 255, 255}, // B_STATUS_BAR_COLOR
|
||||||
// 100...
|
// 100...
|
||||||
{46, 204, 64, 255}, // B_SUCCESS_COLOR
|
{46, 204, 64, 255}, // B_SUCCESS_COLOR
|
||||||
{255, 65, 54, 255}, // B_FAILURE_COLOR
|
{255, 65, 54, 255}, // B_FAILURE_COLOR
|
||||||
@@ -153,6 +154,7 @@ static const char* kColorNames[kColorWhichCount] = {
|
|||||||
"B_LINK_HOVER_COLOR",
|
"B_LINK_HOVER_COLOR",
|
||||||
"B_LINK_VISITED_COLOR",
|
"B_LINK_VISITED_COLOR",
|
||||||
"B_LINK_ACTIVE_COLOR",
|
"B_LINK_ACTIVE_COLOR",
|
||||||
|
"B_STATUS_BAR_COLOR",
|
||||||
// 100...
|
// 100...
|
||||||
"B_SUCCESS_COLOR",
|
"B_SUCCESS_COLOR",
|
||||||
"B_FAILURE_COLOR",
|
"B_FAILURE_COLOR",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ BStatusBar::BStatusBar(BRect frame, const char *name, const char *label,
|
|||||||
BStatusBar::BStatusBar(const char *name, const char *label,
|
BStatusBar::BStatusBar(const char *name, const char *label,
|
||||||
const char *trailingLabel)
|
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),
|
B_WILL_DRAW | B_SUPPORTS_LAYOUT),
|
||||||
fLabel(label),
|
fLabel(label),
|
||||||
fTrailingLabel(trailingLabel)
|
fTrailingLabel(trailingLabel)
|
||||||
@@ -148,7 +148,7 @@ BStatusBar::AttachedToWindow()
|
|||||||
fTextDivider = Bounds().Width();
|
fTextDivider = Bounds().Width();
|
||||||
|
|
||||||
if ((fInternalFlags & kCustomBarColor) == 0)
|
if ((fInternalFlags & kCustomBarColor) == 0)
|
||||||
fBarColor = ui_color(B_CONTROL_MARK_COLOR);
|
fBarColor = ui_color(B_STATUS_BAR_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ BStatusBar::MaxSize()
|
|||||||
float width, height;
|
float width, height;
|
||||||
GetPreferredSize(&width, &height);
|
GetPreferredSize(&width, &height);
|
||||||
|
|
||||||
return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
|
return BLayoutUtils::ComposeSize(ExplicitMaxSize(),
|
||||||
BSize(B_SIZE_UNLIMITED, height));
|
BSize(B_SIZE_UNLIMITED, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,7 +419,7 @@ BStatusBar::MessageReceived(BMessage *message)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case B_RESET_STATUS_BAR:
|
case B_RESET_STATUS_BAR:
|
||||||
{
|
{
|
||||||
const char *label = NULL, *trailing_label = NULL;
|
const char *label = NULL, *trailing_label = NULL;
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ BStatusBar::MessageReceived(BMessage *message)
|
|||||||
{
|
{
|
||||||
// Change the bar color IF we don't have an application-set color.
|
// Change the bar color IF we don't have an application-set color.
|
||||||
if ((fInternalFlags & kCustomBarColor) == 0) {
|
if ((fInternalFlags & kCustomBarColor) == 0) {
|
||||||
message->FindColor(ui_color_name(B_CONTROL_MARK_COLOR),
|
message->FindColor(ui_color_name(B_STATUS_BAR_COLOR),
|
||||||
&fBarColor);
|
&fBarColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,7 +523,7 @@ void
|
|||||||
BStatusBar::SetMaxValue(float max)
|
BStatusBar::SetMaxValue(float max)
|
||||||
{
|
{
|
||||||
// R5 and/or Zeta's SetMaxValue does not trigger an invalidate here.
|
// 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.
|
// as observed with SpaceMonitor.
|
||||||
// TODO: revisit this when we break binary compatibility
|
// TODO: revisit this when we break binary compatibility
|
||||||
fMax = max;
|
fMax = max;
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ static ColorDescription sColorDescriptionTable[] = {
|
|||||||
B_TRANSLATE_MARK("Scroll bar thumb") },
|
B_TRANSLATE_MARK("Scroll bar thumb") },
|
||||||
{ B_TOOL_TIP_BACKGROUND_COLOR, B_TRANSLATE_MARK("Tooltip background") },
|
{ B_TOOL_TIP_BACKGROUND_COLOR, B_TRANSLATE_MARK("Tooltip background") },
|
||||||
{ B_TOOL_TIP_TEXT_COLOR, B_TRANSLATE_MARK("Tooltip text") },
|
{ 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_SUCCESS_COLOR, B_TRANSLATE_MARK("Success") },
|
||||||
{ B_FAILURE_COLOR, B_TRANSLATE_MARK("Failure") },
|
{ B_FAILURE_COLOR, B_TRANSLATE_MARK("Failure") },
|
||||||
{ B_WINDOW_TAB_COLOR, B_TRANSLATE_MARK("Window tab") },
|
{ B_WINDOW_TAB_COLOR, B_TRANSLATE_MARK("Window tab") },
|
||||||
|
|||||||
Reference in New Issue
Block a user