diff options
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index cfc81863..1cbad550 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -51,6 +51,7 @@ struct Impl_LabelWidget { | |||
51 | uint8_t wrap : 1; | 51 | uint8_t wrap : 1; |
52 | uint8_t allCaps : 1; | 52 | uint8_t allCaps : 1; |
53 | uint8_t removeTrailingColon : 1; | 53 | uint8_t removeTrailingColon : 1; |
54 | uint8_t chevron : 1; | ||
54 | } flags; | 55 | } flags; |
55 | }; | 56 | }; |
56 | 57 | ||
@@ -307,7 +308,7 @@ static iRect contentBounds_LabelWidget_(const iLabelWidget *d) { | |||
307 | 308 | ||
308 | static void draw_LabelWidget_(const iLabelWidget *d) { | 309 | static void draw_LabelWidget_(const iLabelWidget *d) { |
309 | const iWidget *w = constAs_Widget(d); | 310 | const iWidget *w = constAs_Widget(d); |
310 | draw_Widget(w); | 311 | drawBackground_Widget(w); |
311 | const iBool isButton = d->click.button != 0; | 312 | const iBool isButton = d->click.button != 0; |
312 | const int64_t flags = flags_Widget(w); | 313 | const int64_t flags = flags_Widget(w); |
313 | const iRect bounds = bounds_Widget(w); | 314 | const iRect bounds = bounds_Widget(w); |
@@ -421,7 +422,7 @@ static void draw_LabelWidget_(const iLabelWidget *d) { | |||
421 | "%s", | 422 | "%s", |
422 | cstr_String(&d->label)); | 423 | cstr_String(&d->label)); |
423 | } | 424 | } |
424 | if (flags & chevron_WidgetFlag) { | 425 | if (d->flags.chevron) { |
425 | const iRect chRect = rect; | 426 | const iRect chRect = rect; |
426 | const int chSize = lineHeight_Text(d->font); | 427 | const int chSize = lineHeight_Text(d->font); |
427 | drawCentered_Text(d->font, | 428 | drawCentered_Text(d->font, |
@@ -430,6 +431,7 @@ static void draw_LabelWidget_(const iLabelWidget *d) { | |||
430 | iTrue, iconColor, rightAngle_Icon); | 431 | iTrue, iconColor, rightAngle_Icon); |
431 | } | 432 | } |
432 | unsetClip_Paint(&p); | 433 | unsetClip_Paint(&p); |
434 | drawChildren_Widget(w); | ||
433 | } | 435 | } |
434 | 436 | ||
435 | static void sizeChanged_LabelWidget_(iLabelWidget *d) { | 437 | static void sizeChanged_LabelWidget_(iLabelWidget *d) { |
@@ -567,6 +569,10 @@ void setNoTopFrame_LabelWidget(iLabelWidget *d, iBool noTopFrame) { | |||
567 | d->flags.noTopFrame = noTopFrame; | 569 | d->flags.noTopFrame = noTopFrame; |
568 | } | 570 | } |
569 | 571 | ||
572 | void setChevron_LabelWidget(iLabelWidget *d, iBool chevron) { | ||
573 | d->flags.chevron = chevron; | ||
574 | } | ||
575 | |||
570 | void setWrap_LabelWidget(iLabelWidget *d, iBool wrap) { | 576 | void setWrap_LabelWidget(iLabelWidget *d, iBool wrap) { |
571 | d->flags.wrap = wrap; | 577 | d->flags.wrap = wrap; |
572 | } | 578 | } |