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.c10
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
308static void draw_LabelWidget_(const iLabelWidget *d) { 309static 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
435static void sizeChanged_LabelWidget_(iLabelWidget *d) { 437static 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
572void setChevron_LabelWidget(iLabelWidget *d, iBool chevron) {
573 d->flags.chevron = chevron;
574}
575
570void setWrap_LabelWidget(iLabelWidget *d, iBool wrap) { 576void setWrap_LabelWidget(iLabelWidget *d, iBool wrap) {
571 d->flags.wrap = wrap; 577 d->flags.wrap = wrap;
572} 578}