Dont resize children with ExpandChildSize when AutoSize is active to avoid broken layout

This commit is contained in:
2026-10-02 14:40:00 +02:00
parent 778974a738
commit 55a161d7d6
3 changed files with 3 additions and 3 deletions
@@ -74,7 +74,7 @@ namespace FlaxEngine.GUI
}
maxHeight = Mathf.Max(maxHeight, ch);
if (ExpandChildSize)
if (ExpandChildSize && !AutoSize)
{
c.Width = itemWidth;
}
@@ -177,7 +177,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// 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).
/// </summary>
[EditorOrder(36), DefaultValue(false)]
[EditorOrder(36), DefaultValue(false), VisibleIf(nameof(AutoSize), true)]
public bool ExpandChildSize
{
get => _expandChildSize;
+1 -1
View File
@@ -74,7 +74,7 @@ namespace FlaxEngine.GUI
}
maxWidth = Mathf.Max(maxWidth, cw);
if (ExpandChildSize)
if (ExpandChildSize && !AutoSize)
{
c.Height = itemHeight;
}