diff --git a/headers/os/interface/InterfaceDefs.h b/headers/os/interface/InterfaceDefs.h index 0f85a486de..82c4bb72ce 100644 --- a/headers/os/interface/InterfaceDefs.h +++ b/headers/os/interface/InterfaceDefs.h @@ -294,6 +294,7 @@ enum color_which { B_CONTROL_TEXT_COLOR = 14, B_CONTROL_BORDER_COLOR = 15, B_CONTROL_HIGHLIGHT_COLOR = 16, + B_CONTROL_MARK_COLOR = 27, B_NAVIGATION_BASE_COLOR = 4, B_NAVIGATION_PULSE_COLOR = 17, B_SHINE_COLOR = 18, diff --git a/headers/private/app/ServerReadOnlyMemory.h b/headers/private/app/ServerReadOnlyMemory.h index 6ceadfde25..821de0372d 100644 --- a/headers/private/app/ServerReadOnlyMemory.h +++ b/headers/private/app/ServerReadOnlyMemory.h @@ -26,23 +26,24 @@ static inline int32 color_which_to_index(color_which which) { // NOTE: this must be kept in sync with InterfaceDefs.h color_which! - if (which <= B_WINDOW_INACTIVE_BORDER_COLOR) + if (which <= B_CONTROL_MARK_COLOR) return which - 1; if (which >= B_SUCCESS_COLOR && which <= B_FAILURE_COLOR) - return which - B_SUCCESS_COLOR + B_WINDOW_INACTIVE_BORDER_COLOR; + return which - B_SUCCESS_COLOR + B_CONTROL_MARK_COLOR; return -1; } + static inline color_which index_to_color_which(int32 index) { if (index >= 0 && index < kNumColors) { - if ((color_which)index < B_WINDOW_INACTIVE_BORDER_COLOR) + if ((color_which)index < B_CONTROL_MARK_COLOR) return (color_which)(index + 1); else { return (color_which)(index + B_SUCCESS_COLOR - - B_WINDOW_INACTIVE_BORDER_COLOR); + - B_CONTROL_MARK_COLOR); } } diff --git a/src/bin/WindowShade.cpp b/src/bin/WindowShade.cpp index dcca8d2978..d8e29a64b1 100644 --- a/src/bin/WindowShade.cpp +++ b/src/bin/WindowShade.cpp @@ -43,6 +43,7 @@ static struct option const kLongOptions[] = { I(control_text_color, B_CONTROL_TEXT_COLOR), I(control_border_color, B_CONTROL_BORDER_COLOR), I(control_highlight_color, B_CONTROL_HIGHLIGHT_COLOR), + I(control_mark_color, B_CONTROL_MARK_COLOR) I(navigation_base_color, B_NAVIGATION_BASE_COLOR), I(navigation_pulse_color, B_NAVIGATION_PULSE_COLOR), I(shine_color, B_SHINE_COLOR), diff --git a/src/kits/interface/ControlLook.cpp b/src/kits/interface/ControlLook.cpp index cc3e6869c1..a0d8a11ec8 100644 --- a/src/kits/interface/ControlLook.cpp +++ b/src/kits/interface/ControlLook.cpp @@ -3197,10 +3197,7 @@ BControlLook::_RadioButtonAndCheckBoxMarkColor(const rgb_color& base, return false; } - // TODO: Get from UI settings - color.red = 27; - color.green = 82; - color.blue = 140; + color = ui_color(B_CONTROL_MARK_COLOR); float mix = 1.0; diff --git a/src/kits/interface/InterfaceDefs.cpp b/src/kits/interface/InterfaceDefs.cpp index 1c53538c44..2a397a93a4 100644 --- a/src/kits/interface/InterfaceDefs.cpp +++ b/src/kits/interface/InterfaceDefs.cpp @@ -96,6 +96,7 @@ static const rgb_color _kDefaultColors[kNumColors] = { {80, 80, 80, 255}, // B_WINDOW_INACTIVE_TEXT_COLOR {224, 224, 224, 255}, // B_WINDOW_BORDER_COLOR {232, 232, 232, 255}, // B_WINDOW_INACTIVE_BORDER_COLOR + {27, 82, 140, 255}, // B_CONTROL_MARK_COLOR // 100... {0, 255, 0, 255}, // B_SUCCESS_COLOR {255, 0, 0, 255}, // B_FAILURE_COLOR diff --git a/src/preferences/appearance/ColorSet.cpp b/src/preferences/appearance/ColorSet.cpp index 757f711d8a..ccd6728f18 100644 --- a/src/preferences/appearance/ColorSet.cpp +++ b/src/preferences/appearance/ColorSet.cpp @@ -34,6 +34,7 @@ static ColorDescription sColorDescriptionTable[] = { B_CONTROL_TEXT_COLOR, B_TRANSLATE_MARK("Control text") }, { B_CONTROL_BORDER_COLOR, B_TRANSLATE_MARK("Control border") }, { B_CONTROL_HIGHLIGHT_COLOR, B_TRANSLATE_MARK("Control highlight") }, + { B_CONTROL_MARK_COLOR, B_TRANSLATE_MARK("Control mark") }, { B_NAVIGATION_BASE_COLOR, B_TRANSLATE_MARK("Navigation base") }, { B_NAVIGATION_PULSE_COLOR, B_TRANSLATE_MARK("Navigation pulse") }, { B_SHINE_COLOR, B_TRANSLATE_MARK("Shine") },