Add B_SCROLL_BAR_THUMB_COLOR constant.

This allows you to change the scrollbar thumb color in Appearance preferences.
The default color is 216, 216, 216 so the scroll bar thumb looks the same by
default. Perhaps someday this can be updated to something a bit more colorful.
This commit is contained in:
John Scipione
2013-04-05 19:26:41 -04:00
parent 631624fb01
commit 9f24981a56
6 changed files with 14 additions and 6 deletions
+5 -5
View File
@@ -13,7 +13,7 @@
#include <InterfaceDefs.h>
static const int32 kNumColors = 34;
static const int32 kNumColors = 35;
struct server_read_only_memory {
rgb_color colors[kNumColors];
@@ -26,10 +26,10 @@ 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_LIST_SELECTED_ITEM_TEXT_COLOR)
if (which <= B_SCROLL_BAR_THUMB_COLOR)
return which - 1;
if (which >= B_SUCCESS_COLOR && which <= B_FAILURE_COLOR)
return which - B_SUCCESS_COLOR + B_LIST_SELECTED_ITEM_TEXT_COLOR;
return which - B_SUCCESS_COLOR + B_SCROLL_BAR_THUMB_COLOR;
return -1;
}
@@ -39,11 +39,11 @@ static inline color_which
index_to_color_which(int32 index)
{
if (index >= 0 && index < kNumColors) {
if ((color_which)index < B_LIST_SELECTED_ITEM_TEXT_COLOR)
if ((color_which)index < B_SCROLL_BAR_THUMB_COLOR)
return (color_which)(index + 1);
else {
return (color_which)(index + B_SUCCESS_COLOR
- B_LIST_SELECTED_ITEM_TEXT_COLOR);
- B_SCROLL_BAR_THUMB_COLOR);
}
}