diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 19:01:40 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 19:01:40 +0300 |
commit | f50c73573c4e8ddec450a05192b8d950f026941d (patch) | |
tree | 158d3bcd63765f47aab53959913c148980211d86 /src/ui/widget.c | |
parent | b1a03400b2d32cf3d82defe15ebe64a3cdcf6981 (diff) |
Widget: Flag for allowing horizontal overflow
Two-column headings are supposed to span both columns.
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index e19a9482..91f6c12d 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -519,11 +519,15 @@ void arrange_Widget(iWidget *d) { | |||
519 | if (isCollapsed_Widget_(child)) { | 519 | if (isCollapsed_Widget_(child)) { |
520 | continue; | 520 | continue; |
521 | } | 521 | } |
522 | iRect childRect = child->rect; | ||
523 | if (child->flags & ignoreForParentWidth_WidgetFlag) { | ||
524 | childRect.size.x = 0; | ||
525 | } | ||
522 | if (isEmpty_Rect(bounds)) { | 526 | if (isEmpty_Rect(bounds)) { |
523 | bounds = child->rect; | 527 | bounds = childRect; |
524 | } | 528 | } |
525 | else { | 529 | else { |
526 | bounds = union_Rect(bounds, child->rect); | 530 | bounds = union_Rect(bounds, childRect); |
527 | } | 531 | } |
528 | } | 532 | } |
529 | adjustEdges_Rect(&bounds, -d->padding[1], d->padding[2], d->padding[3], -d->padding[0]); | 533 | adjustEdges_Rect(&bounds, -d->padding[1], d->padding[2], d->padding[3], -d->padding[0]); |