Dont resize children with ExpandChildSize when AutoSize is active to avoid broken layout
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace FlaxEngine.GUI
|
||||
}
|
||||
maxWidth = Mathf.Max(maxWidth, cw);
|
||||
|
||||
if (ExpandChildSize)
|
||||
if (ExpandChildSize && !AutoSize)
|
||||
{
|
||||
c.Height = itemHeight;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user