From 38b00f458c7544037028538174a438413bd37857 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 27 Mar 2025 20:48:16 +0100 Subject: [PATCH] Restyle dock window hints to match current drag&drop/selection coloring in Editor --- Source/Editor/GUI/Docking/DockHintWindow.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Source/Editor/GUI/Docking/DockHintWindow.cs b/Source/Editor/GUI/Docking/DockHintWindow.cs index 2b0902cf9..103a04c38 100644 --- a/Source/Editor/GUI/Docking/DockHintWindow.cs +++ b/Source/Editor/GUI/Docking/DockHintWindow.cs @@ -446,7 +446,8 @@ namespace FlaxEditor.GUI.Docking Window = Platform.CreateWindow(ref settings); Window.Opacity = 0.6f; - Window.GUI.BackgroundColor = Style.Current.DragWindow; + Window.GUI.BackgroundColor = Style.Current.Selection; + Window.GUI.AddChild(); } else { @@ -457,6 +458,20 @@ namespace FlaxEditor.GUI.Docking InitHitProxy(); } + private sealed class DragVisuals : Control + { + public DragVisuals() + { + AnchorPreset = AnchorPresets.StretchAll; + Offsets = Margin.Zero; + } + + public override void Draw() + { + Render2D.DrawRectangle(new Rectangle(Float2.Zero, Size), Style.Current.SelectionBorder); + } + } + private static void CreateProxy(ref Window win, string name) { if (win != null) @@ -479,7 +494,8 @@ namespace FlaxEditor.GUI.Docking win = Platform.CreateWindow(ref settings); win.Opacity = 0.6f; - win.GUI.BackgroundColor = Style.Current.DragWindow; + win.GUI.BackgroundColor = Style.Current.Selection; + win.GUI.AddChild(); } ///