From fe9794bdc8270b43ed5ae847d65ea2a2eecd4a79 Mon Sep 17 00:00:00 2001 From: sowgro Date: Thu, 18 May 2023 08:51:31 -0400 Subject: fix resizing and the bottom being too long --- src/gui/Driver.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/gui/Driver.java') diff --git a/src/gui/Driver.java b/src/gui/Driver.java index 59002c2..56bc36a 100644 --- a/src/gui/Driver.java +++ b/src/gui/Driver.java @@ -36,10 +36,12 @@ public class Driver extends Application menus.put("Leaderboard", new Leaderboard()); for (Pane value : menus.values()) { - value.minWidthProperty().bind(primaryStage.widthProperty()); - value.minHeightProperty().bind(primaryStage.heightProperty()); + System.out.println(primaryStage.heightProperty()); + value.prefHeightProperty().bind(primaryPane.heightProperty()); + value.prefWidthProperty().bind(primaryPane.widthProperty()); } + Scene primaryScene = new Scene(primaryPane, 800, 600); primaryScene.getStylesheets().add("gui/style.css"); @@ -69,8 +71,8 @@ public class Driver extends Application { primaryPane.getChildren().remove(0); } - pane.minWidthProperty().bind(primaryStage.widthProperty()); - pane.minHeightProperty().bind(primaryStage.heightProperty()); + pane.prefWidthProperty().bind(primaryPane.widthProperty()); + pane.prefHeightProperty().bind(primaryPane.heightProperty()); primaryPane.getChildren().add(pane); primaryPane.requestFocus(); } -- cgit v1.2.3