From 92fa48f8ba7000aeebd65caa014e52b49fa061e3 Mon Sep 17 00:00:00 2001 From: skyjake Date: Fri, 23 Aug 2013 20:03:18 +0300 Subject: [PATCH] UI|Client|Default Style: Use accent color in default dialog button(s) It helps to have a subtle color hint to show which button is the default/recommended one. Also cleaned up colors.dei a little. --- .../client/data/defaultstyle.pack/colors.dei | 21 ++++++++++++++----- .../client/src/ui/widgets/dialogwidget.cpp | 6 ++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/doomsday/client/data/defaultstyle.pack/colors.dei b/doomsday/client/data/defaultstyle.pack/colors.dei index b41360bec9..a4da78cf45 100644 --- a/doomsday/client/data/defaultstyle.pack/colors.dei +++ b/doomsday/client/data/defaultstyle.pack/colors.dei @@ -2,10 +2,16 @@ 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> } @@ -13,6 +19,10 @@ group inverted { 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> } @@ -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> } diff --git a/doomsday/client/src/ui/widgets/dialogwidget.cpp b/doomsday/client/src/ui/widgets/dialogwidget.cpp index b74083173d..d106480a1d 100644 --- a/doomsday/client/src/ui/widgets/dialogwidget.cpp +++ b/doomsday/client/src/ui/widgets/dialogwidget.cpp @@ -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"); + } } }