Add control mark color setting. #8054
An enhancement adding a setting to Colors under Appearance to set the mark color of radio button and check box controls.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user