From 240b28682b3b468a067869e3d669afa6051650d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pereda?= Date: Wed, 23 Oct 2024 18:42:15 +0200 Subject: [PATCH] apply stylesheet to scene (#10) --- .../com/gluonhq/scenebuilder/embedded/SceneBuilderPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gluonhq/scenebuilder/embedded/SceneBuilderPane.java b/src/main/java/com/gluonhq/scenebuilder/embedded/SceneBuilderPane.java index 84d5c2b..5a2067e 100644 --- a/src/main/java/com/gluonhq/scenebuilder/embedded/SceneBuilderPane.java +++ b/src/main/java/com/gluonhq/scenebuilder/embedded/SceneBuilderPane.java @@ -87,7 +87,6 @@ public class SceneBuilderPane extends StackPane { public SceneBuilderPane() { Node mainPane = createSBPane(); getStyleClass().add("theme-presets"); - getStylesheets().add(SceneBuilderPane.class.getResource("sb.css").toExternalForm()); getChildren().addAll(mainPane); sbController = new SBController(this); @@ -134,6 +133,7 @@ public Comparator getSectionComparator() { @Override public void invalidated(Observable observable) { if (getScene() != null) { + getScene().getStylesheets().add(SceneBuilderPane.class.getResource("sb.css").toExternalForm()); getScene().windowProperty().addListener(new InvalidationListener() { @Override public void invalidated(Observable observable) {