summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-16 21:35:33 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-16 21:35:33 +0300
commit0d983d9445af3f1ecee83dc8a19615a14003e1c6 (patch)
tree91c5fac1c162c5584d50b338c464c391c35edaf5 /src/ui/widget.c
parent97f9a1c9bf49ca67fe1f99c57aa70e0bdf64a466 (diff)
Widget: Fixed arrangement resetting
The expand flag should be reset only in the context of the parent's arrangement/resize direction.
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 23c701e4..475e7c1f 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -725,12 +725,15 @@ static void resetArrangement_Widget_(iWidget *d) {
725 if (d->flags & arrangeHorizontal_WidgetFlag) { 725 if (d->flags & arrangeHorizontal_WidgetFlag) {
726 child->rect.pos.x = 0; 726 child->rect.pos.x = 0;
727 } 727 }
728 if (d->flags & resizeWidthOfChildren_WidgetFlag && child->flags & expand_WidgetFlag) {
729 child->rect.size.x = 0;
730 }
728 if (d->flags & arrangeVertical_WidgetFlag) { 731 if (d->flags & arrangeVertical_WidgetFlag) {
729 child->rect.pos.y = 0; 732 child->rect.pos.y = 0;
730 } 733 }
731 } 734 if (d->flags & resizeHeightOfChildren_WidgetFlag && child->flags & expand_WidgetFlag) {
732 if (child->flags & expand_WidgetFlag) { 735 child->rect.size.y = 0;
733 child->rect = zero_Rect(); 736 }
734 } 737 }
735 } 738 }
736} 739}