summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/labelwidget.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c
index ffb0b7c2..9321d7bf 100644
--- a/src/ui/labelwidget.c
+++ b/src/ui/labelwidget.c
@@ -245,17 +245,19 @@ static void draw_LabelWidget_(const iLabelWidget *d) {
245 if (d->icon && d->icon != 0x20) { /* no need to draw an empty icon */ 245 if (d->icon && d->icon != 0x20) { /* no need to draw an empty icon */
246 iString str; 246 iString str;
247 initUnicodeN_String(&str, &d->icon, 1); 247 initUnicodeN_String(&str, &d->icon, 1);
248 drawCentered_Text(d->font, 248 drawCentered_Text(
249 (iRect){ addX_I2(add_I2(bounds.pos, padding_(flags)), 249 d->font,
250 (flags & extraPadding_WidgetFlag ? -2 : -1) * gap_UI), 250 (iRect){
251 init_I2(iconPad, lineHeight_Text(d->font)) }, 251 add_I2(add_I2(bounds.pos, padding_(flags)),
252 iTrue, 252 init_I2((flags & extraPadding_WidgetFlag ? -2 : -1) * gap_UI, -gap_UI / 8)),
253 isCaution ? uiTextCaution_ColorId 253 init_I2(iconPad, lineHeight_Text(d->font)) },
254 : flags & (disabled_WidgetFlag | pressed_WidgetFlag) ? fg 254 iTrue,
255 : isHover ? uiIconHover_ColorId 255 isCaution ? uiTextCaution_ColorId
256 : uiIcon_ColorId, 256 : flags & (disabled_WidgetFlag | pressed_WidgetFlag) ? fg
257 "%s", 257 : isHover ? uiIconHover_ColorId
258 cstr_String(&str)); 258 : uiIcon_ColorId,
259 "%s",
260 cstr_String(&str));
259 deinit_String(&str); 261 deinit_String(&str);
260 } 262 }
261 if (flags & wrapText_WidgetFlag) { 263 if (flags & wrapText_WidgetFlag) {