From b85958214fe37a5e643f08dbf57d837b513e5cfc Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 3 Jul 2024 00:17:18 +0800 Subject: [PATCH] enhance: supports customize system accent color (#232) --- src/App.axaml.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App.axaml.cs b/src/App.axaml.cs index df438ecc..f989a325 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -170,7 +170,13 @@ namespace SourceGit var schema = JsonSerializer.Deserialize(File.ReadAllText(colorsFile), JsonCodeGen.Default.CustomColorSchema); foreach (var kv in schema.Basic) - resDic[$"Color.{kv.Key}"] = Color.Parse(kv.Value); + { + if (kv.Key.Equals("SystemAccentColor", StringComparison.Ordinal)) + resDic["SystemAccentColor"] = Color.Parse(kv.Value); + else + resDic[$"Color.{kv.Key}"] = Color.Parse(kv.Value); + } + if (schema.Graph.Count > 0) {