diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 7e3b65e3..65a3b493 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -22,8 +22,6 @@ - - diff --git a/src/Views/ChromelessWindow.cs b/src/Views/ChromelessWindow.cs index 9f637a15..a9b9f259 100644 --- a/src/Views/ChromelessWindow.cs +++ b/src/Views/ChromelessWindow.cs @@ -3,6 +3,7 @@ using Avalonia.Controls; using Avalonia.Controls.Primitives; using Avalonia.Input; +using Avalonia.Platform; namespace SourceGit.Views { @@ -19,12 +20,25 @@ namespace SourceGit.Views { if (OperatingSystem.IsLinux()) { - if (!UseSystemWindowFrame) + if (UseSystemWindowFrame) + { + ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.Default; + ExtendClientAreaToDecorationsHint = false; + } + else + { + ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome; + ExtendClientAreaToDecorationsHint = true; Classes.Add("custom_window_frame"); + } } - else if (OperatingSystem.IsWindows()) + else { - Classes.Add("fix_maximized_padding"); + ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome; + ExtendClientAreaToDecorationsHint = true; + + if (OperatingSystem.IsWindows()) + Classes.Add("fix_maximized_padding"); } }