diff --git headers/os/interface/ControlLook.h headers/os/interface/ControlLook.h
index b832a1d..f766e08 100644
|
|
protected:
|
330 | 330 | = B_HORIZONTAL) const; |
331 | 331 | |
332 | 332 | bool _RadioButtonAndCheckBoxMarkColor( |
333 | | const rgb_color& base, rgb_color& color, |
334 | | uint32 flags) const; |
| 333 | const rgb_color& base, |
| 334 | rgb_color& markColor, uint32 flags) const; |
335 | 335 | |
336 | 336 | void _DrawRoundBarCorner(BView* view, BRect& rect, |
337 | 337 | const BRect& updateRect, |
diff --git headers/os/interface/InterfaceDefs.h headers/os/interface/InterfaceDefs.h
index 40f2d89..f1082b6 100644
|
|
enum color_which {
|
294 | 294 | B_CONTROL_TEXT_COLOR = 14, |
295 | 295 | B_CONTROL_BORDER_COLOR = 15, |
296 | 296 | B_CONTROL_HIGHLIGHT_COLOR = 16, |
| 297 | B_CONTROL_MARK_COLOR = 25, |
297 | 298 | B_NAVIGATION_BASE_COLOR = 4, |
298 | 299 | B_NAVIGATION_PULSE_COLOR = 17, |
299 | 300 | B_SHINE_COLOR = 18, |
diff --git headers/private/app/ServerReadOnlyMemory.h headers/private/app/ServerReadOnlyMemory.h
index e0bb817..523056b 100644
|
|
static inline int32
|
26 | 26 | color_which_to_index(color_which which) |
27 | 27 | { |
28 | 28 | // NOTE: this must be kept in sync with InterfaceDefs.h color_which! |
29 | | if (which <= B_WINDOW_INACTIVE_TEXT_COLOR) |
| 29 | if (which <= B_CONTROL_MARK_COLOR) |
30 | 30 | return which - 1; |
31 | 31 | if (which >= B_SUCCESS_COLOR && which <= B_FAILURE_COLOR) |
32 | | return which - B_SUCCESS_COLOR + B_WINDOW_INACTIVE_TEXT_COLOR; |
| 32 | return which - B_SUCCESS_COLOR + B_CONTROL_MARK_COLOR; |
33 | 33 | |
34 | 34 | return -1; |
35 | 35 | } |
… |
… |
static inline color_which
|
38 | 38 | index_to_color_which(int32 index) |
39 | 39 | { |
40 | 40 | if (index >= 0 && index < kNumColors) { |
41 | | if ((color_which)index < B_WINDOW_INACTIVE_TEXT_COLOR) |
| 41 | if ((color_which)index < B_CONTROL_MARK_COLOR) |
42 | 42 | return (color_which)(index + 1); |
43 | 43 | else |
44 | | return (color_which)(index + B_SUCCESS_COLOR - B_WINDOW_INACTIVE_TEXT_COLOR); |
| 44 | return (color_which)(index + B_SUCCESS_COLOR - B_CONTROL_MARK_COLOR); |
45 | 45 | } |
46 | 46 | |
47 | 47 | return (color_which)-1; |
diff --git src/bin/WindowShade.cpp src/bin/WindowShade.cpp
index 9b5bc31..a0c4578 100644
|
|
static struct option const kLongOptions[] = {
|
43 | 43 | I(control_text_color, B_CONTROL_TEXT_COLOR), |
44 | 44 | I(control_border_color, B_CONTROL_BORDER_COLOR), |
45 | 45 | I(control_highlight_color, B_CONTROL_HIGHLIGHT_COLOR), |
| 46 | I(control_mark_color, B_CONTROL_MARK_COLOR), |
46 | 47 | I(navigation_base_color, B_NAVIGATION_BASE_COLOR), |
47 | 48 | I(navigation_pulse_color, B_NAVIGATION_PULSE_COLOR), |
48 | 49 | I(shine_color, B_SHINE_COLOR), |
diff --git src/kits/interface/ControlLook.cpp src/kits/interface/ControlLook.cpp
index 3f01f5c..23ee729 100644
|
|
|
8 | 8 | |
9 | 9 | #include <Control.h> |
10 | 10 | #include <GradientLinear.h> |
| 11 | #include <InterfaceDefs.h> |
11 | 12 | #include <Region.h> |
12 | 13 | #include <Shape.h> |
13 | 14 | #include <String.h> |
… |
… |
BControlLook::_MakeGlossyGradient(BGradientLinear& gradient, const BRect& rect,
|
2181 | 2182 | |
2182 | 2183 | bool |
2183 | 2184 | BControlLook::_RadioButtonAndCheckBoxMarkColor(const rgb_color& base, |
2184 | | rgb_color& color, uint32 flags) const |
| 2185 | rgb_color& markColor, uint32 flags) const |
2185 | 2186 | { |
2186 | 2187 | if ((flags & (B_ACTIVATED | B_CLICKED)) == 0) { |
2187 | 2188 | // no mark to be drawn at all |
2188 | 2189 | return false; |
2189 | 2190 | } |
2190 | 2191 | |
2191 | | // TODO: Get from UI settings |
2192 | | color.red = 27; |
2193 | | color.green = 82; |
2194 | | color.blue = 140; |
| 2192 | markColor = ui_color(B_CONTROL_MARK_COLOR); |
2195 | 2193 | |
2196 | 2194 | float mix = 1.0; |
2197 | 2195 | |
… |
… |
BControlLook::_RadioButtonAndCheckBoxMarkColor(const rgb_color& base,
|
2210 | 2208 | // simply activated |
2211 | 2209 | } |
2212 | 2210 | |
2213 | | color.red = uint8(color.red * mix + base.red * (1.0 - mix)); |
2214 | | color.green = uint8(color.green * mix + base.green * (1.0 - mix)); |
2215 | | color.blue = uint8(color.blue * mix + base.blue * (1.0 - mix)); |
| 2211 | markColor.red = uint8(markColor.red * mix + base.red * (1.0 - mix)); |
| 2212 | markColor.green = uint8(markColor.green * mix + base.green * (1.0 - mix)); |
| 2213 | markColor.blue = uint8(markColor.blue * mix + base.blue * (1.0 - mix)); |
2216 | 2214 | |
2217 | 2215 | return true; |
2218 | 2216 | } |
diff --git src/kits/interface/InterfaceDefs.cpp src/kits/interface/InterfaceDefs.cpp
index ed61c2f..82ca87d 100644
|
|
static const rgb_color _kDefaultColors[kNumColors] = {
|
73 | 73 | {216, 216, 216, 255}, // B_PANEL_BACKGROUND_COLOR |
74 | 74 | {216, 216, 216, 255}, // B_MENU_BACKGROUND_COLOR |
75 | 75 | {255, 203, 0, 255}, // B_WINDOW_TAB_COLOR |
76 | | {0, 0, 229, 255}, // B_KEYBOARD_NAVIGATION_COLOR |
| 76 | {0, 0, 229, 255}, // B_NAVIGATION_BASE_COLOR |
| 77 | // (B_KEYBOARD_NAVIGATION_COLOR) |
77 | 78 | {51, 102, 152, 255}, // B_DESKTOP_COLOR |
78 | 79 | {153, 153, 153, 255}, // B_MENU_SELECTED_BACKGROUND_COLOR |
79 | 80 | {0, 0, 0, 255}, // B_MENU_ITEM_TEXT_COLOR |
… |
… |
static const rgb_color _kDefaultColors[kNumColors] = {
|
89 | 90 | {0, 0, 0, 255}, // B_NAVIGATION_PULSE_COLOR |
90 | 91 | {255, 255, 255, 255}, // B_SHINE_COLOR |
91 | 92 | {0, 0, 0, 255}, // B_SHADOW_COLOR |
92 | | {255, 255, 216, 255}, // B_TOOLTIP_BACKGROUND_COLOR |
93 | | {0, 0, 0, 255}, // B_TOOLTIP_TEXT_COLOR |
| 93 | {255, 255, 216, 255}, // B_TOOL_TIP_BACKGROUND_COLOR |
| 94 | {0, 0, 0, 255}, // B_TOOL_TIP_TEXT_COLOR |
94 | 95 | {0, 0, 0, 255}, // B_WINDOW_TEXT_COLOR |
95 | 96 | {232, 232, 232, 255}, // B_WINDOW_INACTIVE_TAB_COLOR |
96 | 97 | {80, 80, 80, 255}, // B_WINDOW_INACTIVE_TEXT_COLOR |
| 98 | {27, 82, 140, 255}, // B_CONTROL_MARK_COLOR |
97 | 99 | // 100... |
98 | 100 | {0, 255, 0, 255}, // B_SUCCESS_COLOR |
99 | 101 | {255, 0, 0, 255}, // B_FAILURE_COLOR |
diff --git src/preferences/appearance/ColorSet.cpp src/preferences/appearance/ColorSet.cpp
index 653eba5..53d696b 100644
|
|
|
13 | 13 | #include <Directory.h> |
14 | 14 | #include <Entry.h> |
15 | 15 | #include <File.h> |
| 16 | #include <GraphicsDefs.h> |
16 | 17 | #include <InterfaceDefs.h> |
17 | 18 | #include <Locale.h> |
18 | 19 | #include <Message.h> |
… |
… |
static ColorDescription sColorDescriptionTable[] =
|
32 | 33 | { B_CONTROL_TEXT_COLOR, B_TRANSLATE_MARK("Control text") }, |
33 | 34 | { B_CONTROL_BORDER_COLOR, B_TRANSLATE_MARK("Control border") }, |
34 | 35 | { B_CONTROL_HIGHLIGHT_COLOR, B_TRANSLATE_MARK("Control highlight") }, |
| 36 | { B_CONTROL_MARK_COLOR, B_TRANSLATE_MARK("Control mark") }, |
35 | 37 | { B_NAVIGATION_BASE_COLOR, B_TRANSLATE_MARK("Navigation base") }, |
36 | 38 | { B_NAVIGATION_PULSE_COLOR, B_TRANSLATE_MARK("Navigation pulse") }, |
37 | 39 | { B_SHINE_COLOR, B_TRANSLATE_MARK("Shine") }, |
… |
… |
ColorSet::DefaultColorSet(void)
|
111 | 113 | ColorSet set; |
112 | 114 | set.fColors[B_PANEL_BACKGROUND_COLOR] = make_color(216, 216, 216); |
113 | 115 | set.fColors[B_PANEL_TEXT_COLOR] = make_color(0, 0, 0); |
114 | | set.fColors[B_DOCUMENT_BACKGROUND_COLOR] = make_color(255,255, 255); |
| 116 | set.fColors[B_DOCUMENT_BACKGROUND_COLOR] = make_color(255, 255, 255); |
115 | 117 | set.fColors[B_DOCUMENT_TEXT_COLOR] = make_color(0, 0, 0); |
116 | 118 | set.fColors[B_CONTROL_BACKGROUND_COLOR] = make_color(245, 245, 245); |
117 | 119 | set.fColors[B_CONTROL_TEXT_COLOR] = make_color(0, 0, 0); |
118 | 120 | set.fColors[B_CONTROL_BORDER_COLOR] = make_color(0, 0, 0); |
119 | | set.fColors[B_CONTROL_HIGHLIGHT_COLOR] = make_color(102, 152, 203); |
| 121 | set.fColors[B_CONTROL_HIGHLIGHT_COLOR] = make_color(153, 153, 153); |
| 122 | set.fColors[B_CONTROL_MARK_COLOR] = make_color(27, 82, 140); |
120 | 123 | set.fColors[B_NAVIGATION_BASE_COLOR] = make_color(0, 0, 229); |
121 | 124 | set.fColors[B_NAVIGATION_PULSE_COLOR] = make_color(0, 0, 0); |
122 | 125 | set.fColors[B_SHINE_COLOR] = make_color(255, 255, 255); |
… |
… |
ColorSet::DefaultColorSet(void)
|
124 | 127 | set.fColors[B_MENU_BACKGROUND_COLOR] = make_color(216, 216, 216); |
125 | 128 | set.fColors[B_MENU_SELECTED_BACKGROUND_COLOR] = make_color(115, 120, 184); |
126 | 129 | set.fColors[B_MENU_ITEM_TEXT_COLOR] = make_color(0, 0, 0); |
127 | | set.fColors[B_MENU_SELECTED_ITEM_TEXT_COLOR] = make_color(255, 255, 255); |
| 130 | set.fColors[B_MENU_SELECTED_ITEM_TEXT_COLOR] = make_color(0, 0, 0); |
128 | 131 | set.fColors[B_MENU_SELECTED_BORDER_COLOR] = make_color(0, 0, 0); |
129 | 132 | set.fColors[B_TOOL_TIP_BACKGROUND_COLOR] = make_color(255, 255, 0); |
130 | 133 | set.fColors[B_TOOL_TIP_TEXT_COLOR] = make_color(0, 0, 0); |