refactor: json serialization

* move all converters to `App.JsonCodeGen.cs`
* use `ColorConverter` instead of parsing colors manually
This commit is contained in:
leo 2024-07-08 16:45:51 +08:00
parent 16d9b627f0
commit 7ee3db500a
No known key found for this signature in database
5 changed files with 64 additions and 50 deletions

View file

@ -1,11 +1,13 @@
using System.Collections.Generic;
using Avalonia.Media;
namespace SourceGit.Models
{
public class ThemeOverrides
{
public Dictionary<string, string> BasicColors { get; set; } = new Dictionary<string, string>();
public Dictionary<string, Color> BasicColors { get; set; } = new Dictionary<string, Color>();
public double GraphPenThickness { get; set; } = 1.5;
public List<string> GraphColors { get; set; } = new List<string>();
public List<Color> GraphColors { get; set; } = new List<Color>();
}
}