mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
refactor: window chrome style
This commit is contained in:
parent
8b469e7778
commit
10e5c7aa6c
2 changed files with 17 additions and 5 deletions
|
@ -22,8 +22,6 @@
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.Window}"/>
|
<Setter Property="Background" Value="{DynamicResource Brush.Window}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border0}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border0}"/>
|
||||||
<Setter Property="ExtendClientAreaChromeHints" Value="NoChrome"/>
|
|
||||||
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True"/>
|
|
||||||
<Setter Property="SystemDecorations" Value="Full"/>
|
<Setter Property="SystemDecorations" Value="Full"/>
|
||||||
<Setter Property="Padding" Value="0"/>
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.Primitives;
|
using Avalonia.Controls.Primitives;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
|
using Avalonia.Platform;
|
||||||
|
|
||||||
namespace SourceGit.Views
|
namespace SourceGit.Views
|
||||||
{
|
{
|
||||||
|
@ -19,11 +20,24 @@ namespace SourceGit.Views
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsLinux())
|
if (OperatingSystem.IsLinux())
|
||||||
{
|
{
|
||||||
if (!UseSystemWindowFrame)
|
if (UseSystemWindowFrame)
|
||||||
|
{
|
||||||
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.Default;
|
||||||
|
ExtendClientAreaToDecorationsHint = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
|
||||||
|
ExtendClientAreaToDecorationsHint = true;
|
||||||
Classes.Add("custom_window_frame");
|
Classes.Add("custom_window_frame");
|
||||||
}
|
}
|
||||||
else if (OperatingSystem.IsWindows())
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
|
||||||
|
ExtendClientAreaToDecorationsHint = true;
|
||||||
|
|
||||||
|
if (OperatingSystem.IsWindows())
|
||||||
Classes.Add("fix_maximized_padding");
|
Classes.Add("fix_maximized_padding");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue