hrev50138 adds 1 changeset to branch 'master'
old head: 361738c0ad4f7319948777ac2c0d49d99a437415
new head: 80bc632afdc31ca050f12a4f400fc89de7633010
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=80bc632afdc3+%5E361738c0ad4f
----------------------------------------------------------------------------
80bc632afdc3: BStatusBar: Restore the old blue-ish color from before the
Set*Color changes.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev50138
Commit: 80bc632afdc31ca050f12a4f400fc89de7633010
URL: http://cgit.haiku-os.org/haiku/commit/?id=80bc632afdc3
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Mar 7 21:08:00 2016 UTC
----------------------------------------------------------------------------
5 files changed, 12 insertions(+), 7 deletions(-)
headers/os/interface/InterfaceDefs.h | 2 ++
headers/private/app/ServerReadOnlyMemory.h | 2 +-
src/kits/interface/InterfaceDefs.cpp | 2 ++
src/kits/interface/StatusBar.cpp | 12 ++++++------
src/preferences/appearance/Colors.cpp | 1 +
----------------------------------------------------------------------------
diff --git a/headers/os/interface/InterfaceDefs.h
b/headers/os/interface/InterfaceDefs.h
index ed550fb..16daf2e 100644
--- a/headers/os/interface/InterfaceDefs.h
+++ b/headers/os/interface/InterfaceDefs.h
@@ -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,
diff --git a/headers/private/app/ServerReadOnlyMemory.h
b/headers/private/app/ServerReadOnlyMemory.h
index f62e3c0..cd74bb7 100644
--- a/headers/private/app/ServerReadOnlyMemory.h
+++ b/headers/private/app/ServerReadOnlyMemory.h
@@ -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
diff --git a/src/kits/interface/InterfaceDefs.cpp
b/src/kits/interface/InterfaceDefs.cpp
index 6c8d980..0549b05 100644
--- a/src/kits/interface/InterfaceDefs.cpp
+++ b/src/kits/interface/InterfaceDefs.cpp
@@ -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
@@ -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",
diff --git a/src/kits/interface/StatusBar.cpp b/src/kits/interface/StatusBar.cpp
index 4da4fa3..c07552b 100644
--- a/src/kits/interface/StatusBar.cpp
+++ b/src/kits/interface/StatusBar.cpp
@@ -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)
@@ -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);
}
@@ -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));
}
@@ -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;
@@ -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);
}
@@ -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;
diff --git a/src/preferences/appearance/Colors.cpp
b/src/preferences/appearance/Colors.cpp
index 88dd2ef..3643611 100644
--- a/src/preferences/appearance/Colors.cpp
+++ b/src/preferences/appearance/Colors.cpp
@@ -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") },