summaryrefslogtreecommitdiff
path: root/src/ui/labelwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r--src/ui/labelwidget.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c
index ee535120..45c02827 100644
--- a/src/ui/labelwidget.c
+++ b/src/ui/labelwidget.c
@@ -163,6 +163,7 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int
163 const iBool isSel = (flags & selected_WidgetFlag) != 0; 163 const iBool isSel = (flags & selected_WidgetFlag) != 0;
164 const iBool isFrameless = (flags & frameless_WidgetFlag) != 0; 164 const iBool isFrameless = (flags & frameless_WidgetFlag) != 0;
165 const iBool isButton = d->click.button != 0; 165 const iBool isButton = d->click.button != 0;
166 const iBool isKeyRoot = (w->root == get_Window()->keyRoot);
166 /* Default color state. */ 167 /* Default color state. */
167 *bg = isButton && ~flags & noBackground_WidgetFlag ? (d->widget.bgColor != none_ColorId ? 168 *bg = isButton && ~flags & noBackground_WidgetFlag ? (d->widget.bgColor != none_ColorId ?
168 d->widget.bgColor : uiBackground_ColorId) 169 d->widget.bgColor : uiBackground_ColorId)
@@ -175,10 +176,20 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int
175 } 176 }
176 if (isSel) { 177 if (isSel) {
177 *bg = uiBackgroundSelected_ColorId; 178 *bg = uiBackgroundSelected_ColorId;
179// if (!isKeyRoot) {
180// *bg = uiEmbossSelected1_ColorId; //uiBackgroundUnfocusedSelection_ColorId;
181// }
182 if (!isKeyRoot) {
183 *bg = isDark_ColorTheme(colorTheme_App()) ? uiBackgroundUnfocusedSelection_ColorId
184 : uiMarked_ColorId ;
185 }
178 *fg = uiTextSelected_ColorId; 186 *fg = uiTextSelected_ColorId;
179 if (isButton) { 187 if (isButton) {
180 *frame1 = uiEmbossSelected1_ColorId; 188 *frame1 = uiEmbossSelected1_ColorId;
181 *frame2 = uiEmbossSelected2_ColorId; 189 *frame2 = uiEmbossSelected2_ColorId;
190 if (!isKeyRoot) {
191 *frame1 = *bg;
192 }
182 } 193 }
183 } 194 }
184 int colorEscape = none_ColorId; 195 int colorEscape = none_ColorId;
@@ -199,7 +210,7 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int
199 } 210 }
200 else { 211 else {
201 *bg = *frame1 = *frame2 = colorEscape; 212 *bg = *frame1 = *frame2 = colorEscape;
202 *fg = uiText_ColorId | permanent_ColorId; 213 *fg = white_ColorId | permanent_ColorId;
203 } 214 }
204 } 215 }
205 else if (isSel) { 216 else if (isSel) {