Added support for colored window tabs in the default decorator.

This commit is contained in:
John Scipione
2011-11-13 14:58:21 -05:00
parent 20db27ba98
commit 30d17caa9d
8 changed files with 54 additions and 38 deletions
+4 -4
View File
@@ -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_WINDOW_INACTIVE_TEXT_COLOR)
if (which <= B_WINDOW_INACTIVE_BORDER_COLOR)
return which - 1;
if (which >= B_SUCCESS_COLOR && which <= B_FAILURE_COLOR)
return which - B_SUCCESS_COLOR + B_WINDOW_INACTIVE_TEXT_COLOR;
return which - B_SUCCESS_COLOR + B_WINDOW_INACTIVE_BORDER_COLOR;
return -1;
}
@@ -38,10 +38,10 @@ static inline color_which
index_to_color_which(int32 index)
{
if (index >= 0 && index < kNumColors) {
if ((color_which)index < B_WINDOW_INACTIVE_TEXT_COLOR)
if ((color_which)index < B_WINDOW_INACTIVE_BORDER_COLOR)
return (color_which)(index + 1);
else
return (color_which)(index + B_SUCCESS_COLOR - B_WINDOW_INACTIVE_TEXT_COLOR);
return (color_which)(index + B_SUCCESS_COLOR - B_WINDOW_INACTIVE_BORDER_COLOR);
}
return (color_which)-1;