Set minimum dimensions for windows
This commit is contained in:
parent
44f5d51cb1
commit
4cd70e02c7
@ -100,6 +100,9 @@ public class Main extends Application {
|
||||
NotificationController controller = fxmlLoader.getController();
|
||||
controller.setNotification(startParams.notification().get());
|
||||
|
||||
primaryStage.setMinWidth(350);
|
||||
primaryStage.setMinHeight(200);
|
||||
|
||||
primaryStage.setTitle("Numbers Station");
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
primaryStage.setScene(new Scene(root));
|
||||
@ -110,6 +113,9 @@ public class Main extends Application {
|
||||
|
||||
MainController controller = fxmlLoader.getController();
|
||||
|
||||
primaryStage.setMinWidth(480);
|
||||
primaryStage.setMinHeight(200);
|
||||
|
||||
primaryStage.setOnCloseRequest(e -> {
|
||||
if (!controller.handleCloseRequest()) {
|
||||
e.consume();
|
||||
|
@ -88,6 +88,8 @@ public class MainController implements Initializable {
|
||||
controller.setStationNameList(settings.getStations().stream().map(StationSettings::toString).toList());
|
||||
|
||||
settingsStage = new Stage();
|
||||
settingsStage.setMinWidth(600);
|
||||
settingsStage.setMinHeight(300);
|
||||
settingsStage.initModality(Modality.APPLICATION_MODAL);
|
||||
settingsStage.setTitle("Numbers Station Settings");
|
||||
settingsStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
@ -115,6 +117,8 @@ public class MainController implements Initializable {
|
||||
controller.setSettings(settings);
|
||||
|
||||
selectStationStage = new Stage();
|
||||
selectStationStage.setMinWidth(300);
|
||||
selectStationStage.setMinHeight(200);
|
||||
selectStationStage.initModality(Modality.APPLICATION_MODAL);
|
||||
selectStationStage.setUserData(null);
|
||||
selectStationStage.setTitle("Numbers Station Selection");
|
||||
@ -403,6 +407,10 @@ public class MainController implements Initializable {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/AboutView.fxml"));
|
||||
Parent root = fxmlLoader.load();
|
||||
aboutStage = new Stage();
|
||||
|
||||
aboutStage.setMinWidth(250);
|
||||
aboutStage.setMinHeight(230);
|
||||
|
||||
aboutStage.setTitle("About Numbers Station");
|
||||
aboutStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
aboutStage.setScene(new Scene(root));
|
||||
@ -424,6 +432,10 @@ public class MainController implements Initializable {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/HelpView.fxml"));
|
||||
Parent root = fxmlLoader.load();
|
||||
helpStage = new Stage();
|
||||
|
||||
helpStage.setMinWidth(400);
|
||||
helpStage.setMinHeight(400);
|
||||
|
||||
helpStage.setTitle("Numbers Station Help");
|
||||
helpStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
helpStage.setScene(new Scene(root));
|
||||
|
Loading…
x
Reference in New Issue
Block a user