mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
feature: supports using native window frame on Linux (#390)
This commit is contained in:
parent
eaf5eba0e7
commit
d5e51d1f32
26 changed files with 218 additions and 39 deletions
|
@ -8,14 +8,24 @@ namespace SourceGit.Views
|
|||
{
|
||||
public class ChromelessWindow : Window
|
||||
{
|
||||
public bool UseSystemWindowFrame
|
||||
{
|
||||
get => OperatingSystem.IsLinux() && ViewModels.Preference.Instance.UseSystemWindowFrame;
|
||||
}
|
||||
|
||||
protected override Type StyleKeyOverride => typeof(Window);
|
||||
|
||||
public ChromelessWindow()
|
||||
{
|
||||
if (OperatingSystem.IsLinux())
|
||||
Classes.Add("custom_window_frame");
|
||||
{
|
||||
if (!UseSystemWindowFrame)
|
||||
Classes.Add("custom_window_frame");
|
||||
}
|
||||
else if (OperatingSystem.IsWindows())
|
||||
{
|
||||
Classes.Add("fix_maximized_padding");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue