diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-20 15:15:42 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-20 15:15:42 +0200 |
commit | 1ca771a41e430f866e3a3270f285fc9a7eacfc65 (patch) | |
tree | 9812569c07a0d569719e1af2ca8b8e494ef7e638 /src/ui/labelwidget.c | |
parent | 876bde9002a5d1faa66cbdac08bf04f4d6719b6e (diff) |
iOS: Removed 2nd sidebar; background tweaks
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index a0664433..1b16a028 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -139,16 +139,17 @@ static void keyStr_LabelWidget_(const iLabelWidget *d, iString *str) { | |||
139 | 139 | ||
140 | static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int *frame1, int *frame2) { | 140 | static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int *frame1, int *frame2) { |
141 | const iWidget *w = constAs_Widget(d); | 141 | const iWidget *w = constAs_Widget(d); |
142 | const iBool isPress = (flags_Widget(w) & pressed_WidgetFlag) != 0; | 142 | const int64_t flags = flags_Widget(w); |
143 | const iBool isSel = (flags_Widget(w) & selected_WidgetFlag) != 0; | 143 | const iBool isPress = (flags & pressed_WidgetFlag) != 0; |
144 | const iBool isFrameless = (flags_Widget(w) & frameless_WidgetFlag) != 0; | 144 | const iBool isSel = (flags & selected_WidgetFlag) != 0; |
145 | const iBool isFrameless = (flags & frameless_WidgetFlag) != 0; | ||
145 | const iBool isButton = d->click.button != 0; | 146 | const iBool isButton = d->click.button != 0; |
146 | /* Default color state. */ | 147 | /* Default color state. */ |
147 | *bg = isButton ? uiBackground_ColorId : none_ColorId; | 148 | *bg = isButton && ~flags & noBackground_WidgetFlag ? uiBackground_ColorId : none_ColorId; |
148 | *fg = uiText_ColorId; | 149 | *fg = uiText_ColorId; |
149 | *frame1 = isButton ? uiEmboss1_ColorId : d->widget.frameColor; | 150 | *frame1 = isButton ? uiEmboss1_ColorId : d->widget.frameColor; |
150 | *frame2 = isButton ? uiEmboss2_ColorId : *frame1; | 151 | *frame2 = isButton ? uiEmboss2_ColorId : *frame1; |
151 | if (flags_Widget(w) & disabled_WidgetFlag && isButton) { | 152 | if (flags & disabled_WidgetFlag && isButton) { |
152 | *fg = uiTextDisabled_ColorId; | 153 | *fg = uiTextDisabled_ColorId; |
153 | } | 154 | } |
154 | if (isSel) { | 155 | if (isSel) { |