fix initial theme selection
@@ -1020,8 +1020,10 @@ public class AppController implements Initializable {
@Subscribe
public void themeChanged(ThemeChangedEvent event) {
String darkCss = getClass().getResource("darktheme.css").toExternalForm();
- if(event.getTheme() == Theme.DARK && !tabs.getScene().getStylesheets().contains(darkCss)) {
+ if(event.getTheme() == Theme.DARK) {
+ if(!tabs.getScene().getStylesheets().contains(darkCss)) {
tabs.getScene().getStylesheets().add(darkCss);
+ }
} else {
tabs.getScene().getStylesheets().remove(darkCss);
}
