feature: supports using native window frame on Linux (#390)

This commit is contained in:
leo 2024-08-22 12:37:26 +08:00
parent eaf5eba0e7
commit d5e51d1f32
No known key found for this signature in database
26 changed files with 218 additions and 39 deletions

View file

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Platform.Storage;
@ -247,5 +248,19 @@ namespace SourceGit.Views
if (changed)
new Commands.Config(null).Set(key, value);
}
private void OnUseNativeWindowFrameChanged(object sender, RoutedEventArgs e)
{
if (sender is CheckBox box)
{
ViewModels.Preference.Instance.UseSystemWindowFrame = box.IsChecked == true;
ViewModels.Preference.Instance.Save();
var dialog = new ConfirmRestart();
App.OpenDialog(dialog);
}
e.Handled = true;
}
}
}