{
get
{
- if (defaultTheme == null && !isLoadingDefault)
- {
- isLoadingDefault = true;
- defaultTheme = LoadBuiltinTheme(profileDefaultTheme[(int)CurrentProfile]);
- isLoadingDefault = false;
- }
+ EnsureDefaultTheme();
return defaultTheme;
}
set => defaultTheme = (Theme)value?.Clone();
return (Theme)result?.Clone();
}
+ internal static void EnsureDefaultTheme()
+ {
+ if (defaultTheme == null && !isLoadingDefault)
+ {
+ isLoadingDefault = true;
+ defaultTheme = LoadBuiltinTheme(profileDefaultTheme[(int)CurrentProfile]);
+ isLoadingDefault = false;
+ }
+ }
+
private static Theme LoadBuiltinTheme(string id)
{
var loaded = new Theme()