fix(dock): address reviewer feedback on drop target overlay

This commit is contained in:
2026-03-28 13:36:36 +09:00
parent 49e6bbe8b0
commit bb0f9be600
2 changed files with 5 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ namespace Ghost.Editor.View.Controls;
/// A control that renders a docking layout tree. /// A control that renders a docking layout tree.
/// </summary> /// </summary>
[TemplatePart(Name = PART_ROOT_GRID, Type = typeof(Grid))] [TemplatePart(Name = PART_ROOT_GRID, Type = typeof(Grid))]
[TemplatePart(Name = PART_DROP_TARGET_OVERLAY, Type = typeof(Border))]
public sealed partial class DockLayout : Control public sealed partial class DockLayout : Control
{ {
private const string PART_ROOT_GRID = "PART_RootGrid"; private const string PART_ROOT_GRID = "PART_RootGrid";
@@ -22,7 +23,7 @@ public sealed partial class DockLayout : Control
private Border? _dropTargetOverlay; private Border? _dropTargetOverlay;
private readonly HashSet<DockNode> _subscribedNodes = new(); private readonly HashSet<DockNode> _subscribedNodes = new();
public enum DockPosition { Center, Top, Bottom, Left, Right, None } internal enum DockPosition { Center, Top, Bottom, Left, Right, None }
public DockLayout() public DockLayout()
{ {

View File

@@ -10,8 +10,9 @@
<Grid> <Grid>
<Grid x:Name="PART_RootGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" /> <Grid x:Name="PART_RootGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" />
<Border x:Name="PART_DropTargetOverlay" <Border x:Name="PART_DropTargetOverlay"
Background="#660078D4" Background="{ThemeResource SystemControlHighlightAccentBrush}"
BorderBrush="#FF0078D4" Opacity="0.4"
BorderBrush="{ThemeResource SystemControlHighlightAccentBrush}"
BorderThickness="2" BorderThickness="2"
Visibility="Collapsed" Visibility="Collapsed"
IsHitTestVisible="False" /> IsHitTestVisible="False" />