mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
fix initial theme selection
This commit is contained in:
parent
76820377ae
commit
668dd88436
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue