Skip to content

Commit

Permalink
[UX] Enable dock's tool floating windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndysc committed Mar 13, 2024
1 parent 5df5b68 commit 0545e94
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dock
5 changes: 1 addition & 4 deletions WDE.Common.Avalonia/WDE.Common.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
<None Update="Resources\*.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Syntax\sql.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Syntax\sql.dark.xml">
<None Update="Resources\Syntax\*.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public AvaloniaDocumentDockWrapper(IDocumentManager documentManager, IDocument d
Title = document.Title;
ViewModel = document;
CanClose = true;
CanFloat = false;
CanFloat = true;
CanPin = false;

var title = document.ToObservable(d => d.Title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public AvaloniaToolDockWrapper(IDocumentManager documentManager, ITool tool)
Id = tool.UniqueId;
Title = tool.Title;
ViewModel = tool;
CanFloat = false;
CanFloat = true;
CanPin = true;
CanClose = true;
}
Expand Down
8 changes: 4 additions & 4 deletions WoWDatabaseEditorCore.Avalonia/Docking/DockFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace WoWDatabaseEditorCore.Avalonia.Docking
{
public class DockFactory : Factory
{
public override IDocumentDock CreateDocumentDock() => new FocusAwareDocumentDock() {CanFloat = false};
public override IToolDock CreateToolDock() => new FocusAwareToolDock() {CanFloat = false};
public override IDocumentDock CreateDocumentDock() => new FocusAwareDocumentDock() {CanFloat = true};
public override IToolDock CreateToolDock() => new FocusAwareToolDock() {CanFloat = true};

public void AddToolAsDocument(IDock layout, AvaloniaToolDockWrapper tool)
{
Expand Down Expand Up @@ -51,7 +51,7 @@ public void AddTool(IDock layout, AvaloniaToolDockWrapper toolWrapper, ToolPrefe
Id = "tool",
Title = "Tools",
Proportion = 0.2f,
CanFloat = false
CanFloat = true
};
if (position == ToolPreferedPosition.Left)
{
Expand Down Expand Up @@ -81,7 +81,7 @@ public override IRootDock CreateLayout()
Title = "MainLayout",
Proportion = 1,
IsCollapsable = false,
CanFloat = false,
CanFloat = true,
Orientation = Orientation.Horizontal,
ActiveDockable = null,
VisibleDockables = CreateList<IDockable>
Expand Down

0 comments on commit 0545e94

Please sign in to comment.