summaryrefslogtreecommitdiff
path: root/src/ui/labelwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-05 22:53:10 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-05 22:53:10 +0200
commit78dcb6d388155454cfd042072419eb03080ad57d (patch)
tree73c0eb31abfa00c999ec500e3c9f8ebcf335913c /src/ui/labelwidget.c
parentb9d8c68236b14bda918e3089f5965fdfd60ecba4 (diff)
UI color tuning; menu item backgrounds
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r--src/ui/labelwidget.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c
index 4de00ec1..ffb0b7c2 100644
--- a/src/ui/labelwidget.c
+++ b/src/ui/labelwidget.c
@@ -224,8 +224,9 @@ static void draw_LabelWidget_(const iLabelWidget *d) {
224 init_Paint(&p); 224 init_Paint(&p);
225 int bg, fg, frame, frame2; 225 int bg, fg, frame, frame2;
226 getColors_LabelWidget_(d, &bg, &fg, &frame, &frame2); 226 getColors_LabelWidget_(d, &bg, &fg, &frame, &frame2);
227 const iBool isCaution = startsWith_String(&d->label, uiTextCaution_ColorEscape);
227 if (bg >= 0) { 228 if (bg >= 0) {
228 fillRect_Paint(&p, rect, bg); 229 fillRect_Paint(&p, rect, isCaution && isHover ? uiMarked_ColorId : bg);
229 } 230 }
230 if (~flags & frameless_WidgetFlag) { 231 if (~flags & frameless_WidgetFlag) {
231 iRect frameRect = adjusted_Rect(rect, zero_I2(), init1_I2(-1)); 232 iRect frameRect = adjusted_Rect(rect, zero_I2(), init1_I2(-1));
@@ -249,8 +250,7 @@ static void draw_LabelWidget_(const iLabelWidget *d) {
249 (flags & extraPadding_WidgetFlag ? -2 : -1) * gap_UI), 250 (flags & extraPadding_WidgetFlag ? -2 : -1) * gap_UI),
250 init_I2(iconPad, lineHeight_Text(d->font)) }, 251 init_I2(iconPad, lineHeight_Text(d->font)) },
251 iTrue, 252 iTrue,
252 startsWith_String(&d->label, uiTextCaution_ColorEscape) 253 isCaution ? uiTextCaution_ColorId
253 ? uiTextCaution_ColorId
254 : flags & (disabled_WidgetFlag | pressed_WidgetFlag) ? fg 254 : flags & (disabled_WidgetFlag | pressed_WidgetFlag) ? fg
255 : isHover ? uiIconHover_ColorId 255 : isHover ? uiIconHover_ColorId
256 : uiIcon_ColorId, 256 : uiIcon_ColorId,