Skip to content

Commit

Permalink
apply stylesheet to scene (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperedadnr authored Oct 23, 2024
1 parent ec882e9 commit 240b286
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -134,6 +133,7 @@ public Comparator<String> 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) {
Expand Down

0 comments on commit 240b286

Please sign in to comment.