From 5790ea49785ea5d00c538dd335c1518f99492889 Mon Sep 17 00:00:00 2001 From: SimonB Date: Wed, 26 Jun 2024 07:44:17 +0100 Subject: [PATCH] - Turn settings window into a proper modal. --- .../faforever/client/headerbar/MainMenuButtonController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/faforever/client/headerbar/MainMenuButtonController.java b/src/main/java/com/faforever/client/headerbar/MainMenuButtonController.java index 453f9ba58d..35d00a3fcb 100644 --- a/src/main/java/com/faforever/client/headerbar/MainMenuButtonController.java +++ b/src/main/java/com/faforever/client/headerbar/MainMenuButtonController.java @@ -12,6 +12,7 @@ import com.faforever.client.theme.UiService; import com.faforever.client.ui.StageHolder; import javafx.scene.control.MenuButton; +import javafx.stage.Modality; import javafx.stage.Stage; import javafx.stage.WindowEvent; import lombok.RequiredArgsConstructor; @@ -73,12 +74,13 @@ public void onSettingsSelected() { SettingsController settingsController = uiService.loadFxml("theme/settings/settings.fxml"); FxStage fxStage = FxStage.create(settingsController.getRoot()) .initOwner(menuButton.getScene().getWindow()) - .withSceneFactory(themeService::createScene) + .withSceneFactory(themeService::createScene) .allowMinimize(false) .apply() .setTitleBar(settingsController.settingsHeader); Stage stage = fxStage.getStage(); + stage.initModality(Modality.WINDOW_MODAL); stage.setTitle(i18n.get("settings.windowTitle")); stage.show();