diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-15 22:54:31 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-15 22:54:31 +0300 |
commit | aeae3fa0c61afcfdec3a18342a8c2d072e234875 (patch) | |
tree | 04b71a011f859b6b19ec8a2763894ec91a709ebe /src | |
parent | afce90c9f6b52db97de29824d1afd1a0742550df (diff) |
Widget: Rearranging expanding widgets
When starting a new arrangement, expanding widgets must be reset so they won't affect the outcome.
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/util.c | 2 | ||||
-rw-r--r-- | src/ui/widget.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index e653b58c..82047479 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1836,7 +1836,7 @@ static void updateValueInputWidth_(iWidget *dlg) { | |||
1836 | } | 1836 | } |
1837 | else { | 1837 | else { |
1838 | dlg->rect.size.x = | 1838 | dlg->rect.size.x = |
1839 | iMaxi(iMaxi(iMin(rootSize.x, 100 * gap_UI), title->rect.size.x), prompt->rect.size.x); | 1839 | iMin(rootSize.x, iMaxi(iMaxi(100 * gap_UI, title->rect.size.x), prompt->rect.size.x)); |
1840 | } | 1840 | } |
1841 | } | 1841 | } |
1842 | 1842 | ||
diff --git a/src/ui/widget.c b/src/ui/widget.c index 3a67bf4e..310522ce 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -741,6 +741,9 @@ static void resetArrangement_Widget_(iWidget *d) { | |||
741 | child->rect.pos.y = 0; | 741 | child->rect.pos.y = 0; |
742 | } | 742 | } |
743 | } | 743 | } |
744 | if (child->flags & expand_WidgetFlag) { | ||
745 | child->rect = zero_Rect(); | ||
746 | } | ||
744 | } | 747 | } |
745 | } | 748 | } |
746 | 749 | ||