From 898a5d3cc597a8e6f5f24a6fa172dcf2893d73c6 Mon Sep 17 00:00:00 2001 From: Marvin Elsen Date: Thu, 10 Oct 2024 20:32:43 +0200 Subject: [PATCH] Fix preference dialog root to resize with scene and fill stage properly See: https://stackoverflow.com/a/77470109 --- .../com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt b/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt index 3cf1860..0b19020 100644 --- a/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt +++ b/src/main/kotlin/com/marvinelsen/willow/ui/dialogs/PreferencesDialog.kt @@ -37,6 +37,8 @@ class PreferencesDialog( } val root = fxmlLoader.load(javaClass.getResourceAsStream("/fxml/dialogs/preferences.fxml")) as DialogPane + root.prefHeightProperty().bind(dialogPane.scene.heightProperty()); + root.prefWidthProperty().bind(dialogPane.scene.widthProperty()); dialogPane = root title = "Settings"