mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-06-29 03:20:18 +12:00
Falls back to Light theme if loaded theme does not include some elements.
This commit is contained in:
parent
c67c6094c8
commit
03ecbee5f9
|
@ -13,8 +13,12 @@
|
||||||
|
|
||||||
<!-- Load default sidebar theme, in case LoadedTheme doesn't have Sidebar properties applied. -->
|
<!-- Load default sidebar theme, in case LoadedTheme doesn't have Sidebar properties applied. -->
|
||||||
<ResourceDictionary x:Name="DefaultSidebarTheme" Source="Themes/Default_Sidebar.xaml"/>
|
<ResourceDictionary x:Name="DefaultSidebarTheme" Source="Themes/Default_Sidebar.xaml"/>
|
||||||
|
|
||||||
<!-- Load default theme. Currently it's Dark, not sure if you want to change it to Light. -->
|
<!-- Load default theme, in case the LoadedTheme does not include any visual elements for some controls.
|
||||||
|
If someone tried to load a completely empty theme, it will "fall back" to Light theme.-->
|
||||||
|
<ResourceDictionary x:Name="DefaultTheme" Source="Themes/Light.xaml"/>
|
||||||
|
|
||||||
|
<!-- Load theme to be modified via the Theme engine. -->
|
||||||
<ResourceDictionary x:Name="LoadedTheme" Source="Themes/Dark.xaml"/>
|
<ResourceDictionary x:Name="LoadedTheme" Source="Themes/Dark.xaml"/>
|
||||||
|
|
||||||
<!-- Load SVG icons, courtesy of lolPants. -->
|
<!-- Load SVG icons, courtesy of lolPants. -->
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace ModAssistant
|
||||||
private static Dictionary<string, Theme> loadedThemes = new Dictionary<string, Theme>();
|
private static Dictionary<string, Theme> loadedThemes = new Dictionary<string, Theme>();
|
||||||
private static List<string> preInstalledThemes = new List<string> { "Light", "Dark", "Light Pink" }; //These themes will always be available to use.
|
private static List<string> preInstalledThemes = new List<string> { "Light", "Dark", "Light Pink" }; //These themes will always be available to use.
|
||||||
|
|
||||||
private static readonly int LOADEDTHEME_INDEX = 3;
|
private static readonly int LOADEDTHEME_INDEX = 4;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load all themes from local Themes subfolder and from embedded resources.
|
/// Load all themes from local Themes subfolder and from embedded resources.
|
||||||
|
|
Loading…
Reference in a new issue