Пример #1
0
 @Nullable
 public static MTTheme valueOfIgnoreCase(@Nullable String name) {
   for (MTTheme theme : MTTheme.values()) {
     if (theme.name().equalsIgnoreCase(name)) {
       return theme;
     }
   }
   return null;
 }
Пример #2
0
 @NotNull
 public static MTTheme getCurrentPreference() {
   String name = PropertiesComponent.getInstance().getValue(getSettingsPrefix() + ".theme");
   MTTheme theme = MTTheme.valueOfIgnoreCase(name);
   return theme == null ? MTTheme.DEFAULT : theme;
 }