Skip to content

Commit

Permalink
Update host window style
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Sep 16, 2023
1 parent a7842f0 commit e8e7340
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Dock.Avalonia/Controls/HostWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@

<Style Selector="^:toolwindow">

<Setter Property="SystemDecorations" Value="None" />
<Setter Property="SystemDecorations" Value="Full" />
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
<Setter Property="ExtendClientAreaChromeHints" Value="PreferSystemChrome" />
<Setter Property="ExtendClientAreaChromeHints" Value="NoChrome" />
<Setter Property="ExtendClientAreaTitleBarHeightHint" Value="0" />

<Setter Property="Template">
<ControlTemplate>
Expand Down
3 changes: 2 additions & 1 deletion src/Dock.Avalonia/Controls/ToolChromeControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
base.OnApplyTemplate(e);

//On linux we dont attach to the HostWindow because of inconsistent drag behaviour
if (VisualRoot is HostWindow window && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (VisualRoot is HostWindow window
&& (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)))
{
Grip = e.NameScope.Find<Control>("PART_Grip");
CloseButton = e.NameScope.Find<Button>("PART_CloseButton");
Expand Down

0 comments on commit e8e7340

Please sign in to comment.