Added system accent color variations to generated code

As title suggests.
This commit is contained in:
Kiki Saintonge 2019-03-22 13:47:28 -07:00
Родитель b02704687b
Коммит bf6dcd5937
1 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -58,6 +58,15 @@ namespace FluentEditor.ControlPalette.Model
sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListLowColor\">{0}</Color>", model.DarkBase.Palette[8].ActiveColor.ToString())); sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListLowColor\">{0}</Color>", model.DarkBase.Palette[8].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListMediumColor\">{0}</Color>", model.DarkBase.Palette[5].ActiveColor.ToString())); sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListMediumColor\">{0}</Color>", model.DarkBase.Palette[5].ActiveColor.ToString()));
sb.AppendLine(" <!-- Override system generated accent colors -->");
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorDark1\">{0}</Color>", model.DarkPrimary.Palette[4].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorDark2\">{0}</Color>", model.DarkPrimary.Palette[3].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorDark3\">{0}</Color>", model.DarkPrimary.Palette[2].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorLight1\">{0}</Color>", model.DarkPrimary.Palette[6].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorLight2\">{0}</Color>", model.DarkPrimary.Palette[7].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorLight3\">{0}</Color>", model.DarkPrimary.Palette[8].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"RegionColor\">{0}</Color>", model.DarkRegion.ActiveColor.ToString())); sb.AppendLine(string.Format(" <Color x:Key=\"RegionColor\">{0}</Color>", model.DarkRegion.ActiveColor.ToString()));
sb.AppendLine(" <SolidColorBrush x:Key=\"RegionBrush\" Color=\"{StaticResource RegionColor}\" />"); sb.AppendLine(" <SolidColorBrush x:Key=\"RegionBrush\" Color=\"{StaticResource RegionColor}\" />");
if (showAllColors) if (showAllColors)
@ -139,6 +148,15 @@ namespace FluentEditor.ControlPalette.Model
sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListLowColor\">{0}</Color>", model.LightBase.Palette[1].ActiveColor.ToString())); sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListLowColor\">{0}</Color>", model.LightBase.Palette[1].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListMediumColor\">{0}</Color>", model.LightBase.Palette[5].ActiveColor.ToString())); sb.AppendLine(string.Format(" <Color x:Key=\"SystemRevealListMediumColor\">{0}</Color>", model.LightBase.Palette[5].ActiveColor.ToString()));
sb.AppendLine(" <!-- Override system generated accent colors -->");
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorLight1\">{0}</Color>", model.LightPrimary.Palette[4].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorLight2\">{0}</Color>", model.LightPrimary.Palette[3].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorLight3\">{0}</Color>", model.LightPrimary.Palette[2].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorDark1\">{0}</Color>", model.LightPrimary.Palette[6].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorDark2\">{0}</Color>", model.LightPrimary.Palette[7].ActiveColor.ToString()));
sb.AppendLine(string.Format(" <Color x:Key=\"SystemAccentColorDark3\">{0}</Color>", model.LightPrimary.Palette[8].ActiveColor.ToString()));
sb.AppendLine(" <RevealBackgroundBrush x:Key=\"SystemControlHighlightListLowRevealBackgroundBrush\" TargetTheme=\"Light\" Color=\"{ThemeResource SystemRevealListMediumColor}\" FallbackColor=\"{ StaticResource SystemListMediumColor}\" />"); sb.AppendLine(" <RevealBackgroundBrush x:Key=\"SystemControlHighlightListLowRevealBackgroundBrush\" TargetTheme=\"Light\" Color=\"{ThemeResource SystemRevealListMediumColor}\" FallbackColor=\"{ StaticResource SystemListMediumColor}\" />");
sb.AppendLine(string.Format(" <Color x:Key=\"RegionColor\">{0}</Color>", model.LightRegion.ActiveColor.ToString())); sb.AppendLine(string.Format(" <Color x:Key=\"RegionColor\">{0}</Color>", model.LightRegion.ActiveColor.ToString()));