Fix game cooker platform selector layout on small window

This commit is contained in:
Wojtek Figat
2022-01-26 23:15:55 +01:00
parent e11410c5d1
commit 787051b12e

View File

@@ -817,11 +817,12 @@ namespace FlaxEditor.Windows
BackgroundColor = Style.Current.LightBackground,
Parent = tab,
};
platformSelector.SizeChanged += OnPlatformSelectorSizeChanged;
var panel = new Panel(ScrollBars.Vertical)
{
AnchorPreset = AnchorPresets.StretchAll,
Offsets = new Margin(0, 0, platformSelector.Offsets.Height, 0),
Parent = tab
Parent = tab,
};
var settings = new CustomEditorPresenter(null);
@@ -829,6 +830,12 @@ namespace FlaxEditor.Windows
settings.Select(new BuildTabProxy(this, platformSelector));
}
private void OnPlatformSelectorSizeChanged(Control platformSelector)
{
var panel = platformSelector.Parent.Children[platformSelector.IndexInParent + 1];
panel.Offsets = new Margin(0, 0, platformSelector.Offsets.Height, 0);
}
/// <summary>
/// Load the build presets from the settings.
/// </summary>