diff --git a/Source/Engine/UI/GUI/Panels/HorizontalPanel.cs b/Source/Engine/UI/GUI/Panels/HorizontalPanel.cs index da6e747b3..fa322f641 100644 --- a/Source/Engine/UI/GUI/Panels/HorizontalPanel.cs +++ b/Source/Engine/UI/GUI/Panels/HorizontalPanel.cs @@ -74,7 +74,7 @@ namespace FlaxEngine.GUI } maxHeight = Mathf.Max(maxHeight, ch); - if (ExpandChildSize) + if (ExpandChildSize && !AutoSize) { c.Width = itemWidth; } diff --git a/Source/Engine/UI/GUI/Panels/PanelWithMargins.cs b/Source/Engine/UI/GUI/Panels/PanelWithMargins.cs index 773415d64..eb2706e88 100644 --- a/Source/Engine/UI/GUI/Panels/PanelWithMargins.cs +++ b/Source/Engine/UI/GUI/Panels/PanelWithMargins.cs @@ -177,7 +177,7 @@ namespace FlaxEngine.GUI /// /// If checked, the panel will expand all children in the relevant direction with even spacing and size (horizontally for Horizontal Panel, vertically for Vertical Panel). /// - [EditorOrder(36), DefaultValue(false)] + [EditorOrder(36), DefaultValue(false), VisibleIf(nameof(AutoSize), true)] public bool ExpandChildSize { get => _expandChildSize; diff --git a/Source/Engine/UI/GUI/Panels/VerticalPanel.cs b/Source/Engine/UI/GUI/Panels/VerticalPanel.cs index d54e6c203..00b849529 100644 --- a/Source/Engine/UI/GUI/Panels/VerticalPanel.cs +++ b/Source/Engine/UI/GUI/Panels/VerticalPanel.cs @@ -74,7 +74,7 @@ namespace FlaxEngine.GUI } maxWidth = Mathf.Max(maxWidth, cw); - if (ExpandChildSize) + if (ExpandChildSize && !AutoSize) { c.Height = itemHeight; }