diff --git a/README.md b/README.md index 1f73b3c9..a2b36b58 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,10 @@ This app supports open repository in external tools listed in the table below. | Color.BadgeFG | Badge foreground color | | Color.Conflict | Conflict panel background color | | Color.ConflictForeground | Conflict panel foreground color | +| Color.DecoratorIconBG | Background color for commit ref icon | +| Color.DecoratorIcon | Foreground color for commit ref icon | +| Color.DecoratorBranch | Background color for commit branch ref name | +| Color.DecoratorTag | Background color for commit tag ref name | | Color.Border0 | Border color used in some controls, like Window, Tab, Toolbar, etc. | | Color.Border1 | Border color used in inputs, like TextBox, ComboBox, etc. | | Color.Border2 | Border color used in visual lines, like seperators, Rectange, etc. | diff --git a/src/Converters/DecoratorTypeConverters.cs b/src/Converters/DecoratorTypeConverters.cs index e19cb37c..f730b613 100644 --- a/src/Converters/DecoratorTypeConverters.cs +++ b/src/Converters/DecoratorTypeConverters.cs @@ -11,8 +11,8 @@ namespace SourceGit.Converters new FuncValueConverter(v => { if (v == Models.DecoratorType.Tag) - return Models.DecoratorResources.Backgrounds[0]; - return Models.DecoratorResources.Backgrounds[1]; + return Application.Current.FindResource("Brush.DecoratorTag") as IBrush; + return Application.Current.FindResource("Brush.DecoratorBranch") as IBrush; }); public static readonly FuncValueConverter ToIcon = diff --git a/src/Models/Decorator.cs b/src/Models/Decorator.cs index 60ffc1ee..235101cc 100644 --- a/src/Models/Decorator.cs +++ b/src/Models/Decorator.cs @@ -1,6 +1,4 @@ -using Avalonia.Media; - -namespace SourceGit.Models +namespace SourceGit.Models { public enum DecoratorType { @@ -17,12 +15,4 @@ namespace SourceGit.Models public DecoratorType Type { get; set; } = DecoratorType.None; public string Name { get; set; } = ""; } - - public static class DecoratorResources - { - public static readonly IBrush[] Backgrounds = [ - new SolidColorBrush(0xFF02C302), - new SolidColorBrush(0xFFFFB835), - ]; - } } diff --git a/src/Resources/Themes.axaml b/src/Resources/Themes.axaml index 56189cab..1f3a0d10 100644 --- a/src/Resources/Themes.axaml +++ b/src/Resources/Themes.axaml @@ -13,8 +13,10 @@ #FFFAFAFA #FFB0CEE8 #FF1F1F1F - #FF6F6F6F + #FF6F6F6F #FFF8F8F8 + #FFFFB835 + #FF02C302 #FF836C2E #FFFFFFFF #FFCFCFCF @@ -43,8 +45,10 @@ #FF1B1B1B #FF8F8F8F #FFDDDDDD - #FF505050 + #FF505050 #FFF8F8F8 + #FFFFB835 + #FF02C302 #FFFAFAD2 #FF252525 #FF181818 @@ -73,8 +77,10 @@ - + + + diff --git a/src/Views/CommitBaseInfo.axaml b/src/Views/CommitBaseInfo.axaml index 42fa2b48..6e0429aa 100644 --- a/src/Views/CommitBaseInfo.axaml +++ b/src/Views/CommitBaseInfo.axaml @@ -90,7 +90,7 @@ - + diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml index 565daa8e..d1aae81d 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -46,7 +46,7 @@ - +