diff --git a/G-Earth/src/main/java/gearth/ui/titlebar/TitleBarController.java b/G-Earth/src/main/java/gearth/ui/titlebar/TitleBarController.java index a89b69f..aeefe0d 100644 --- a/G-Earth/src/main/java/gearth/ui/titlebar/TitleBarController.java +++ b/G-Earth/src/main/java/gearth/ui/titlebar/TitleBarController.java @@ -78,8 +78,6 @@ public class TitleBarController { controller.stage = stage; controller.config = config; stage.initStyle(StageStyle.TRANSPARENT); - stage.getScene().setFill(Color.TRANSPARENT); - stage.getScene().getRoot().getStyleClass().add("root-node"); stage.titleProperty().addListener((i) -> controller.setTitle(stage.getTitle())); controller.setTitle(stage.getTitle()); @@ -88,6 +86,9 @@ public class TitleBarController { controller.updateIcon(); Platform.runLater(() -> { + stage.getScene().setFill(Color.TRANSPARENT); + stage.getScene().getRoot().getStyleClass().add("root-node"); + controller.themeBtn.setVisible(config.displayThemePicker()); if (!config.displayMinimizeButton()) { ((GridPane) controller.minimizeBtn.getParent()).getChildren().remove(controller.minimizeBtn); diff --git a/G-Earth/src/main/resources/gearth/ui/themes/G-Earth/styling.css b/G-Earth/src/main/resources/gearth/ui/themes/G-Earth/styling.css index e7a6169..9c14574 100644 --- a/G-Earth/src/main/resources/gearth/ui/themes/G-Earth/styling.css +++ b/G-Earth/src/main/resources/gearth/ui/themes/G-Earth/styling.css @@ -9,7 +9,11 @@ .themed-background { -fx-background-color: white; - -fx-background-radius: 4; +} + +.root-node > * { + -fx-background-color: white; + -fx-background-radius: 0 0 10 10; } .button,.menu-button,.toggle-button,.split-menu-button { diff --git a/G-Earth/src/main/resources/gearth/ui/themes/G-Earth_Dark/styling.css b/G-Earth/src/main/resources/gearth/ui/themes/G-Earth_Dark/styling.css index f1f19f7..de587a2 100644 --- a/G-Earth/src/main/resources/gearth/ui/themes/G-Earth_Dark/styling.css +++ b/G-Earth/src/main/resources/gearth/ui/themes/G-Earth_Dark/styling.css @@ -10,7 +10,11 @@ .themed-background { -fx-background-color: #363636; - -fx-background-radius: 4; +} + +.root-node > * { + -fx-background-color: #363636; + -fx-background-radius: 0 0 10 10; } .button,.menu-button,.toggle-button,.split-menu-button { @@ -1011,7 +1015,6 @@ VBox > .split-menu-button.last > .arrow-button { /* Error window */ .dialog-pane { -fx-background-color: #333333; - -fx-background-radius: 0; } .dialog-pane:header .header-panel { diff --git a/G-Earth/src/main/resources/gearth/ui/themes/Tanji/styling.css b/G-Earth/src/main/resources/gearth/ui/themes/Tanji/styling.css index d0aa2a2..5b99078 100644 --- a/G-Earth/src/main/resources/gearth/ui/themes/Tanji/styling.css +++ b/G-Earth/src/main/resources/gearth/ui/themes/Tanji/styling.css @@ -7,9 +7,13 @@ -fx-border-width: 0 1 1 1; } -.themed-background { +.themed-background{ -fx-background-color: white; - -fx-background-radius: 4; +} + +.root-node > * { + -fx-background-color: white; + -fx-background-radius: 0 0 10 10; } .button,.menu-button,.toggle-button,.split-menu-button {