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