diff options
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index 09c5812b..46ef5d1f 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -45,6 +45,7 @@ struct Impl_LabelWidget { | |||
45 | uint8_t alignVisual : 1; /* align according to visible bounds, not font metrics */ | 45 | uint8_t alignVisual : 1; /* align according to visible bounds, not font metrics */ |
46 | uint8_t noAutoMinHeight : 1; /* minimum height is not set automatically */ | 46 | uint8_t noAutoMinHeight : 1; /* minimum height is not set automatically */ |
47 | uint8_t drawAsOutline : 1; /* draw as outline, filled with background color */ | 47 | uint8_t drawAsOutline : 1; /* draw as outline, filled with background color */ |
48 | uint8_t noTopFrame : 1; | ||
48 | } flags; | 49 | } flags; |
49 | }; | 50 | }; |
50 | 51 | ||
@@ -290,7 +291,7 @@ static void draw_LabelWidget_(const iLabelWidget *d) { | |||
290 | }; | 291 | }; |
291 | drawLines_Paint(&p, points + 2, 3, frame2); | 292 | drawLines_Paint(&p, points + 2, 3, frame2); |
292 | drawLines_Paint( | 293 | drawLines_Paint( |
293 | &p, points, !isHover && flags & noTopFrame_WidgetFlag ? 2 : 3, frame); | 294 | &p, points, !isHover && flags & d->flags.noTopFrame ? 2 : 3, frame); |
294 | } | 295 | } |
295 | } | 296 | } |
296 | setClip_Paint(&p, rect); | 297 | setClip_Paint(&p, rect); |
@@ -444,6 +445,7 @@ void init_LabelWidget(iLabelWidget *d, const char *label, const char *cmd) { | |||
444 | d->flags.alignVisual = iFalse; | 445 | d->flags.alignVisual = iFalse; |
445 | d->flags.noAutoMinHeight = iFalse; | 446 | d->flags.noAutoMinHeight = iFalse; |
446 | d->flags.drawAsOutline = iFalse; | 447 | d->flags.drawAsOutline = iFalse; |
448 | d->flags.noTopFrame = iFalse; | ||
447 | updateSize_LabelWidget(d); | 449 | updateSize_LabelWidget(d); |
448 | updateKey_LabelWidget_(d); /* could be bound to another key */ | 450 | updateKey_LabelWidget_(d); /* could be bound to another key */ |
449 | } | 451 | } |
@@ -483,6 +485,10 @@ void setNoAutoMinHeight_LabelWidget(iLabelWidget *d, iBool noAutoMinHeight) { | |||
483 | } | 485 | } |
484 | } | 486 | } |
485 | 487 | ||
488 | void setNoTopFrame_LabelWidget(iLabelWidget *d, iBool noTopFrame) { | ||
489 | d->flags.noTopFrame = noTopFrame; | ||
490 | } | ||
491 | |||
486 | void setOutline_LabelWidget(iLabelWidget *d, iBool drawAsOutline) { | 492 | void setOutline_LabelWidget(iLabelWidget *d, iBool drawAsOutline) { |
487 | d->flags.drawAsOutline = drawAsOutline; | 493 | d->flags.drawAsOutline = drawAsOutline; |
488 | } | 494 | } |