Added support for colored window tabs in the default decorator.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user