mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08: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,12 +20,25 @@ 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
|
||||||
{
|
{
|
||||||
Classes.Add("fix_maximized_padding");
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
|
||||||
|
ExtendClientAreaToDecorationsHint = true;
|
||||||
|
|
||||||
|
if (OperatingSystem.IsWindows())
|
||||||
|
Classes.Add("fix_maximized_padding");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue