From cdd53f09b92c5dddd143f8c44f27588cb21eff4a Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 30 May 2024 10:01:32 -0500 Subject: [PATCH] Add extra spacing for transform properties. --- .../Editors/ActorTransformEditor.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs b/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs index 3794bffc8..e341d4d4f 100644 --- a/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs +++ b/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs @@ -41,6 +41,13 @@ namespace FlaxEditor.CustomEditors.Editors public override void Initialize(LayoutElementsContainer layout) { base.Initialize(layout); + + if (XElement.ValueBox.Parent is UniformGridPanel ug) + { + ug.Height += 2; + ug.SlotSpacing = new Float2(4); + ug.SlotPadding = new Margin(0, 0, 1, 1); + } // Override colors var back = FlaxEngine.GUI.Style.Current.TextBoxBackground; @@ -66,6 +73,13 @@ namespace FlaxEditor.CustomEditors.Editors public override void Initialize(LayoutElementsContainer layout) { base.Initialize(layout); + + if (XElement.ValueBox.Parent is UniformGridPanel ug) + { + ug.Height += 2; + ug.SlotSpacing = new Float2(4); + ug.SlotPadding = new Margin(0, 0, 1, 1); + } // Override colors var back = FlaxEngine.GUI.Style.Current.TextBoxBackground; @@ -122,6 +136,13 @@ namespace FlaxEditor.CustomEditors.Editors menu.AddButton("Link", ToggleLink).LinkTooltip("Links scale components for uniform scaling"); }; } + + if (XElement.ValueBox.Parent is UniformGridPanel ug) + { + ug.Height += 2; + ug.SlotSpacing = new Float2(4); + ug.SlotPadding = new Margin(0, 0, 1, 1); + } // Override colors var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;