Improve Default BButton Appearance

Change control border color to 172, 172, 172 and use for default button
indicator drawing.

People doing an in-place upgrade will need to modify the border color from
its previous default manually or by pressing "Default" in the Appearance
preflet.  This is a one-time annoyance.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes: #12589
This commit is contained in:
looncraz 2016-01-18 15:30:59 +00:00 committed by Adrien Destugues
parent efc430eaf3
commit 37f9a29216
2 changed files with 7 additions and 8 deletions

View File

@ -2149,18 +2149,17 @@ BControlLook::_DrawButtonFrame(BView* view, BRect& rect,
rgb_color edgeShadowColor;
// default button frame color
// TODO: B_BLEND_FRAME
float defaultIndicatorTint = 1.2;
if ((flags & B_DISABLED) != 0)
defaultIndicatorTint = (B_NO_TINT + defaultIndicatorTint) / 2;
rgb_color defaultIndicatorColor = tint_color(base, defaultIndicatorTint);
rgb_color defaultIndicatorColor = ui_color(B_CONTROL_BORDER_COLOR);
rgb_color cornerBgColor;
if ((flags & B_DISABLED) != 0) {
defaultIndicatorColor = disable_color(defaultIndicatorColor,
background);
}
drawing_mode oldMode = view->DrawingMode();
if ((flags & B_DEFAULT_BUTTON) != 0) {
defaultIndicatorColor = ui_color(B_CONTROL_HIGHLIGHT_COLOR);
cornerBgColor = defaultIndicatorColor;
edgeLightColor = _EdgeLightColor(defaultIndicatorColor,
contrast * ((flags & B_DISABLED) != 0 ? 0.3 : 0.8),

View File

@ -86,7 +86,7 @@ static const rgb_color _kDefaultColors[kColorWhichCount] = {
{0, 0, 0, 255}, // B_DOCUMENT_TEXT_COLOR
{245, 245, 245, 255}, // B_CONTROL_BACKGROUND_COLOR
{0, 0, 0, 255}, // B_CONTROL_TEXT_COLOR
{0, 0, 0, 255}, // B_CONTROL_BORDER_COLOR
{172, 172, 172, 255}, // B_CONTROL_BORDER_COLOR
{102, 152, 203, 255}, // B_CONTROL_HIGHLIGHT_COLOR
{0, 0, 0, 255}, // B_NAVIGATION_PULSE_COLOR
{255, 255, 255, 255}, // B_SHINE_COLOR