Set default UI Theme

This commit is contained in:
SiboVG 2023-08-16 23:25:23 +02:00
parent c2a3ebffc3
commit e74914d762

View File

@ -339,7 +339,11 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences {
private UITheme.Theme getUIThemeAsTheme() {
String themeName = getString(net.sf.openrocket.startup.Preferences.UI_THEME, UITheme.Themes.LIGHT.name());
if (themeName == null) return UITheme.Themes.LIGHT; // Default theme
return UITheme.Themes.valueOf(themeName);
try {
return UITheme.Themes.valueOf(themeName);
} catch (IllegalArgumentException e) {
return UITheme.Themes.LIGHT;
}
}
/**