Restyle dock window hints to match current drag&drop/selection coloring in Editor
This commit is contained in:
@@ -446,7 +446,8 @@ namespace FlaxEditor.GUI.Docking
|
|||||||
|
|
||||||
Window = Platform.CreateWindow(ref settings);
|
Window = Platform.CreateWindow(ref settings);
|
||||||
Window.Opacity = 0.6f;
|
Window.Opacity = 0.6f;
|
||||||
Window.GUI.BackgroundColor = Style.Current.DragWindow;
|
Window.GUI.BackgroundColor = Style.Current.Selection;
|
||||||
|
Window.GUI.AddChild<DragVisuals>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -457,6 +458,20 @@ namespace FlaxEditor.GUI.Docking
|
|||||||
InitHitProxy();
|
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)
|
private static void CreateProxy(ref Window win, string name)
|
||||||
{
|
{
|
||||||
if (win != null)
|
if (win != null)
|
||||||
@@ -479,7 +494,8 @@ namespace FlaxEditor.GUI.Docking
|
|||||||
|
|
||||||
win = Platform.CreateWindow(ref settings);
|
win = Platform.CreateWindow(ref settings);
|
||||||
win.Opacity = 0.6f;
|
win.Opacity = 0.6f;
|
||||||
win.GUI.BackgroundColor = Style.Current.DragWindow;
|
win.GUI.BackgroundColor = Style.Current.Selection;
|
||||||
|
win.GUI.AddChild<DragVisuals>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user