Adjust the border color using tints so that it is just so, not too 3d. Get rid of all the extra contstants and just tint off of the base color.

This commit is contained in:
John Scipione 2011-10-28 20:38:16 -04:00
parent 30d17caa9d
commit a18c2a6d9e
2 changed files with 16 additions and 20 deletions

View File

@ -95,8 +95,6 @@ DefaultDecorator::DefaultDecorator(DesktopSettings& settings, BRect rect)
Decorator(settings, rect),
// focus color constants
kFocusFrameColor(settings.UIColor(B_WINDOW_BORDER_COLOR)),
kFocusFrameColorBevel(tint_color(kFocusFrameColor, B_LIGHTEN_2_TINT)),
kFocusFrameColorDark(tint_color(kFocusFrameColor, B_DARKEN_1_TINT)),
kFocusTabColor(settings.UIColor(B_WINDOW_TAB_COLOR)),
kFocusTabColorLight(tint_color(kFocusTabColor,
(B_LIGHTEN_MAX_TINT + B_LIGHTEN_2_TINT) / 2)),
@ -106,8 +104,6 @@ DefaultDecorator::DefaultDecorator(DesktopSettings& settings, BRect rect)
kFocusTextColor(settings.UIColor(B_WINDOW_TEXT_COLOR)),
// non-focus color constants
kNonFocusFrameColor(settings.UIColor(B_WINDOW_INACTIVE_BORDER_COLOR)),
kNonFocusFrameColorBevel(tint_color(kNonFocusFrameColor, B_LIGHTEN_2_TINT)),
kNonFocusFrameColorDark(tint_color(kNonFocusFrameColor, B_DARKEN_1_TINT)),
kNonFocusTabColor(settings.UIColor(B_WINDOW_INACTIVE_TAB_COLOR)),
kNonFocusTabColorLight(tint_color(kNonFocusTabColor,
(B_LIGHTEN_MAX_TINT + B_LIGHTEN_2_TINT) / 2)),
@ -1494,8 +1490,10 @@ DefaultDecorator::GetComponentColors(Component component, uint8 highlight,
DefaultDecorator::Tab* tab = static_cast<DefaultDecorator::Tab*>(_tab);
switch (component) {
case COMPONENT_TAB:
_colors[COLOR_TAB_FRAME_LIGHT] = kFrameColors[0];
_colors[COLOR_TAB_FRAME_DARK] = kFrameColors[3];
_colors[COLOR_TAB_FRAME_LIGHT]
= tint_color(kFocusFrameColor, B_DARKEN_2_TINT);
_colors[COLOR_TAB_FRAME_DARK]
= tint_color(kFocusFrameColor, B_DARKEN_3_TINT);
if (tab && tab->buttonFocus) {
_colors[COLOR_TAB] = kFocusTabColor;
_colors[COLOR_TAB_LIGHT] = kFocusTabColorLight;
@ -1528,21 +1526,23 @@ DefaultDecorator::GetComponentColors(Component component, uint8 highlight,
case COMPONENT_BOTTOM_BORDER:
case COMPONENT_RESIZE_CORNER:
default:
_colors[0] = kFrameColors[0];
//_colors[1] = kFrameColors[1];
if (tab && tab->buttonFocus) {
_colors[1] = kFocusFrameColorBevel;
_colors[0] = tint_color(kFocusFrameColor, B_DARKEN_2_TINT);
_colors[1] = tint_color(kFocusFrameColor, B_LIGHTEN_2_TINT);
_colors[2] = kFocusFrameColor;
_colors[3] = kFocusFrameColor;
_colors[4] = kFocusFrameColorDark;
_colors[3] = tint_color(kFocusFrameColor,
(B_DARKEN_1_TINT + B_NO_TINT) / 2);
_colors[4] = tint_color(kFocusFrameColor, B_DARKEN_2_TINT);
_colors[5] = tint_color(kFocusFrameColor, B_DARKEN_3_TINT);
} else {
_colors[1] = kFocusFrameColorBevel;
_colors[0] = tint_color(kNonFocusFrameColor, B_DARKEN_2_TINT);
_colors[1] = tint_color(kNonFocusFrameColor, B_LIGHTEN_2_TINT);
_colors[2] = kNonFocusFrameColor;
_colors[3] = kNonFocusFrameColor;
_colors[4] = kNonFocusFrameColorDark;
_colors[3] = tint_color(kNonFocusFrameColor,
(B_DARKEN_1_TINT + B_NO_TINT) / 2);
_colors[4] = tint_color(kNonFocusFrameColor, B_DARKEN_2_TINT);
_colors[5] = tint_color(kNonFocusFrameColor, B_DARKEN_3_TINT);
}
//_colors[4] = kFrameColors[2];
_colors[5] = kFrameColors[3];
// for the resize-border highlight dye everything bluish.
if (highlight == HIGHLIGHT_RESIZE_BORDER) {

View File

@ -188,8 +188,6 @@ protected:
static const rgb_color kFrameColors[4];
const rgb_color kFocusFrameColor;
const rgb_color kFocusFrameColorBevel;
const rgb_color kFocusFrameColorDark;
const rgb_color kFocusTabColor;
const rgb_color kFocusTabColorLight;
@ -198,8 +196,6 @@ protected:
const rgb_color kFocusTextColor;
const rgb_color kNonFocusFrameColor;
const rgb_color kNonFocusFrameColorBevel;
const rgb_color kNonFocusFrameColorDark;
const rgb_color kNonFocusTabColor;
const rgb_color kNonFocusTabColorLight;