Skip to content

Commit

Permalink
UI|Client|Default Style: Use accent color in default dialog button(s)
Browse files Browse the repository at this point in the history
It helps to have a subtle color hint to show which button is the
default/recommended one.

Also cleaned up colors.dei a little.
  • Loading branch information
skyjake committed Aug 23, 2013
1 parent 141474b commit 92fa48f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
21 changes: 16 additions & 5 deletions doomsday/client/data/defaultstyle.pack/colors.dei
Expand Up @@ -2,17 +2,27 @@

script { import gui, Version }

color text { rgb <1.0, 1.0, 1.0> }
color background { rgb <0.0, 0.0, 0.0, 0.75> }
color accent { rgb <1.0, 0.8, 0.4> }
color glow { rgb <1.0, 1.0, 1.0, 0.14> }
#
# THE BASIC COLOR PALETTE
#

color text { rgb <1.0, 1.0, 1.0> }
color background { rgb <0.0, 0.0, 0.0, 0.75> }
color accent { rgb <1.0, 0.8, 0.4> }
color glow { rgb <1.0, 1.0, 1.0, 0.14> }

color textaccent { rgb $= gui.colorMix(text.rgb, accent.rgb, 0.5) }

group inverted {
color text { rgb <0.0, 0.0, 0.0> }
color background { rgb <1.0, 1.0, 1.0, 0.75> }
color glow { rgb <0.0, 0.0, 0.0, 0.15> }
}

#
# COLORS FOR SPECIFIC WIDGETS
#

group label {
color highlight { rgb <1.0, 1.0, 1.0> }
color dimmed { rgb <0.72, 0.72, 0.68> }
Expand All @@ -37,11 +47,12 @@ group progress {

group dialog {
color background { rgb $= gui.colorAlpha(background.rgb, 0.9) }
color default { rgb $= textaccent.rgb }
}

group editor {
color cursor { rgb $= gui.colorAlpha(accent.rgb, 0.7) }
color hint { rgb $= gui.colorMix(text.rgb, accent.rgb, 0.5) }
color hint { rgb $= textaccent.rgb }

group completion {
color background { rgb <1.0, 1.0, 1.0> }
Expand Down
6 changes: 6 additions & 0 deletions doomsday/client/src/ui/widgets/dialogwidget.cpp
Expand Up @@ -215,10 +215,16 @@ DENG2_OBSERVES(ui::Context, Removal)
}
}

// Highlight the default button(s).
if(i->role().testFlag(Default))
{
but.setTextColor("dialog.default");
but.setText(_E(b) + but.text());
}
else
{
but.setTextColor("text");
}
}
}

Expand Down

0 comments on commit 92fa48f

Please sign in to comment.