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