Restyle dock window hints to match current drag&drop/selection coloring in Editor

This commit is contained in:
Wojtek Figat
2025-03-27 20:48:16 +01:00
parent 1c64845169
commit 38b00f458c

View File

@@ -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<DragVisuals>();
}
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<DragVisuals>();
}
/// <summary>