From f60c3b288aa1d4f2dbd1a49f1eafe26deaa75dfd Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 26 Apr 2021 19:21:11 +0200 Subject: [PATCH] also apply auto-sizing if the element has no children at all --- MLEM.Ui/Elements/Element.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index 65996b6..cb303ca 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -623,7 +623,7 @@ namespace MLEM.Ui.Elements { foreach (var child in this.Children) child.ForceUpdateArea(); - if (this.Children.Count > 0) { + if (this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren) { Element foundChild = null; var autoSize = this.UnscrolledArea.Size; if (this.SetHeightBasedOnChildren) {