Fix various margins and spacings between UI elements in Editor to be consistent

This commit is contained in:
Wojtek Figat
2025-05-30 15:28:56 +02:00
parent 08ed5ae483
commit 14fcc593c7
29 changed files with 143 additions and 126 deletions

View File

@@ -20,5 +20,7 @@ namespace FlaxEditor.Utilities
#else
public const string ShowInExplorer = "Show in explorer";
#endif
public const float UIMargin = 3.0f;
}
}

View File

@@ -415,13 +415,10 @@ namespace FlaxEditor.Utilities
/// </summary>
/// <param name="parentLayout">The parent layout element.</param>
/// <param name="path">The import path.</param>
/// <param name="useInitialSpacing">Whether to use an initial layout space of 5 for separation.</param>
public static void CreateImportPathUI(CustomEditors.LayoutElementsContainer parentLayout, string path, bool useInitialSpacing = true)
public static void CreateImportPathUI(CustomEditors.LayoutElementsContainer parentLayout, string path)
{
if (!string.IsNullOrEmpty(path))
{
if (useInitialSpacing)
parentLayout.Space(0);
var textBox = parentLayout.TextBox().TextBox;
textBox.TooltipText = "Source asset path. Can be relative or absolute to the project. Path is not editable here.";
textBox.IsReadOnly = true;