mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed theming, this closes #51
This commit is contained in:
parent
dd5889ec3e
commit
ef6e6459f2
@ -15,7 +15,6 @@
|
|||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
|
||||||
<!-- Accent and AppTheme setting -->
|
<!-- Accent and AppTheme setting -->
|
||||||
<ResourceDictionary Source="pack://application:,,,/Styles/Accents/CorsairYellow.xaml" />
|
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Teal.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Teal.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
|
||||||
<ResourceDictionary Source="/Resources/Icons.xaml" />
|
<ResourceDictionary Source="/Resources/Icons.xaml" />
|
||||||
|
|||||||
@ -10,11 +10,11 @@ namespace Artemis.Settings
|
|||||||
{
|
{
|
||||||
public class GeneralSettings
|
public class GeneralSettings
|
||||||
{
|
{
|
||||||
private readonly Accent _artemisAccent = ThemeManager.GetAccent("Teal");
|
public GeneralSettings()
|
||||||
private readonly Accent _corsairAccent = new Accent("CorsairYellow",
|
{
|
||||||
new Uri("pack://application:,,,/Styles/Accents/CorsairYellow.xaml"));
|
ThemeManager.AddAccent("CorsairYellow", new Uri("pack://application:,,,/Styles/Accents/CorsairYellow.xaml"));
|
||||||
private readonly AppTheme _darkTheme = ThemeManager.GetAppTheme("BaseDark");
|
ApplyTheme();
|
||||||
private readonly AppTheme _lightTheme = ThemeManager.GetAppTheme("BaseLight");
|
}
|
||||||
|
|
||||||
public int GamestatePort
|
public int GamestatePort
|
||||||
{
|
{
|
||||||
@ -105,22 +105,25 @@ namespace Artemis.Settings
|
|||||||
ApplyGamestatePort();
|
ApplyGamestatePort();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: http://visionarycoder.com/2015/01/06/setting-themeaccent-with-mahapps-metro/
|
|
||||||
private void ApplyTheme()
|
private void ApplyTheme()
|
||||||
{
|
{
|
||||||
switch (Theme)
|
switch (Theme)
|
||||||
{
|
{
|
||||||
case "Light":
|
case "Light":
|
||||||
ThemeManager.ChangeAppStyle(Application.Current, _artemisAccent, _lightTheme);
|
ThemeManager.ChangeAppStyle(Application.Current, ThemeManager.GetAccent("Teal"),
|
||||||
|
ThemeManager.GetAppTheme("BaseLight"));
|
||||||
break;
|
break;
|
||||||
case "Dark":
|
case "Dark":
|
||||||
ThemeManager.ChangeAppStyle(Application.Current, _artemisAccent, _darkTheme);
|
ThemeManager.ChangeAppStyle(Application.Current, ThemeManager.GetAccent("Teal"),
|
||||||
|
ThemeManager.GetAppTheme("BaseDark"));
|
||||||
break;
|
break;
|
||||||
case "Corsair Light":
|
case "Corsair Light":
|
||||||
ThemeManager.ChangeAppStyle(Application.Current, _corsairAccent, _lightTheme);
|
ThemeManager.ChangeAppStyle(Application.Current, ThemeManager.GetAccent("CorsairYellow"),
|
||||||
|
ThemeManager.GetAppTheme("BaseLight"));
|
||||||
break;
|
break;
|
||||||
case "Corsair Dark":
|
case "Corsair Dark":
|
||||||
ThemeManager.ChangeAppStyle(Application.Current, _corsairAccent, _darkTheme);
|
ThemeManager.ChangeAppStyle(Application.Current, ThemeManager.GetAccent("CorsairYellow"),
|
||||||
|
ThemeManager.GetAppTheme("BaseDark"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
<Color x:Key="AccentBaseColor">#FFF0CF1E</Color>
|
<Color x:Key="AccentBaseColor">#FFF0CF1E</Color>
|
||||||
<!--80%-->
|
<!--80%-->
|
||||||
<Color x:Key="AccentColor">#FFF0CF1E</Color>
|
<Color x:Key="AccentColor">#CDF0CF1E</Color>
|
||||||
<!--60%-->
|
<!--60%-->
|
||||||
<Color x:Key="AccentColor2">#FFF0CF1E</Color>
|
<Color x:Key="AccentColor2">#99F0CF1E</Color>
|
||||||
<!--40%-->
|
<!--40%-->
|
||||||
<Color x:Key="AccentColor3">#FFF0CF1E</Color>
|
<Color x:Key="AccentColor3">#66F0CF1E</Color>
|
||||||
<!--20%-->
|
<!--20%-->
|
||||||
<Color x:Key="AccentColor4">#FFF0CF1E</Color>
|
<Color x:Key="AccentColor4">#32F0CF1E</Color>
|
||||||
|
|
||||||
<!-- re-set brushes too -->
|
<!-- re-set brushes too -->
|
||||||
<SolidColorBrush x:Key="HighlightBrush" Color="{StaticResource HighlightColor}" options:Freeze="True" />
|
<SolidColorBrush x:Key="HighlightBrush" Color="{StaticResource HighlightColor}" options:Freeze="True" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user