fieldset bugs

This commit is contained in:
Adam D. Ruppe 2020-12-16 10:20:26 -05:00
parent d958638298
commit 43c839cbf9
1 changed files with 8 additions and 2 deletions

View File

@ -5854,11 +5854,17 @@ class Fieldset : Widget {
override int maxHeight() { override int maxHeight() {
auto m = paddingTop() + paddingBottom(); auto m = paddingTop() + paddingBottom();
foreach(child; children) { foreach(child; children) {
m += child.maxHeight(); auto mh = child.maxHeight();
if(mh == int.max)
return int.max;
m += mh;
m += child.marginBottom(); m += child.marginBottom();
m += child.marginTop(); m += child.marginTop();
} }
return m + 6; m += 6;
if(m < minHeight)
return minHeight;
return m;
} }
override int minHeight() { override int minHeight() {