use of com.haulmont.cuba.desktop.theme.DesktopThemeLoader in project cuba by cuba-platform.
the class App method initTheme.
protected void initTheme() throws Exception {
DesktopConfig config = configuration.getConfig(DesktopConfig.class);
String themeName = config.getTheme();
DesktopThemeLoader desktopThemeLoader = AppBeans.get(DesktopThemeLoader.NAME);
theme = desktopThemeLoader.loadTheme(themeName);
theme.init();
ThemeConstantsRepository themeRepository = AppBeans.get(ThemeConstantsRepository.NAME);
ThemeConstants uiTheme = themeRepository.getConstants(themeName);
if (uiTheme == null) {
throw new IllegalStateException("Unable to use theme constants '" + themeName + "'");
}
this.themeConstants = uiTheme;
}
Aggregations