mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
style: border-less window style on Linux platform.
This commit is contained in:
parent
f4b396596b
commit
035300a612
23 changed files with 752 additions and 427 deletions
|
@ -2,13 +2,15 @@
|
|||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using Avalonia;
|
||||
using System.Runtime.InteropServices;
|
||||
using System;
|
||||
|
||||
namespace SourceGit.Converters {
|
||||
public static class WindowStateConverters {
|
||||
public static FuncValueConverter<WindowState, Thickness> ToContentMargin =
|
||||
new FuncValueConverter<WindowState, Thickness>(state => {
|
||||
if (state == WindowState.Maximized && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
||||
if (OperatingSystem.IsWindows() && state == WindowState.Maximized) {
|
||||
return new Thickness(6);
|
||||
} else if (OperatingSystem.IsLinux() && state != WindowState.Maximized) {
|
||||
return new Thickness(6);
|
||||
} else {
|
||||
return new Thickness(0);
|
||||
|
@ -17,7 +19,7 @@ namespace SourceGit.Converters {
|
|||
|
||||
public static FuncValueConverter<WindowState, GridLength> ToTitleBarHeight =
|
||||
new FuncValueConverter<WindowState, GridLength>(state => {
|
||||
if (state == WindowState.Maximized && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
||||
if (state == WindowState.Maximized) {
|
||||
return new GridLength(30);
|
||||
} else {
|
||||
return new GridLength(38);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue