mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: supports user overrides the default color schema
This commit is contained in:
parent
9aca84533c
commit
62e5ed8a42
9 changed files with 91 additions and 22 deletions
|
@ -214,6 +214,23 @@ namespace SourceGit.Views
|
|||
Close();
|
||||
}
|
||||
|
||||
private async void SelectColorSchemaFile(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var options = new FilePickerOpenOptions()
|
||||
{
|
||||
FileTypeFilter = [new FilePickerFileType("Theme Color Schema File") { Patterns = ["*.json"] }],
|
||||
AllowMultiple = false,
|
||||
};
|
||||
|
||||
var selected = await StorageProvider.OpenFilePickerAsync(options);
|
||||
if (selected.Count == 1)
|
||||
{
|
||||
ViewModels.Preference.Instance.ColorOverrides = selected[0].Path.LocalPath;
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private async void SelectGitExecutable(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var pattern = OperatingSystem.IsWindows() ? "git.exe" : "git";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue