wayland/kde fix made windows version resizeable

This commit is contained in:
sirjonasxx 2020-04-24 14:31:40 +02:00
parent b16e59595f
commit 1b6f7d4a90

View File

@ -37,10 +37,13 @@ public class Main extends Application {
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/gearth/G-EarthLogoSmaller.png")));
primaryStage.setResizable(true);
primaryStage.onShownProperty().addListener(e -> {
Platform.runLater(() -> primaryStage.setResizable(false));
});
// TODO fix
primaryStage.setResizable(false);
// primaryStage.setResizable(true);
// primaryStage.onShownProperty().addListener(e -> {
// Platform.runLater(() -> primaryStage.setResizable(false));
// });
//primaryStage.initStyle(StageStyle.UNDECORATED);
primaryStage.setTitle("G-Earth " + version);
primaryStage.setScene(new Scene(root, 650, 295));
@ -60,10 +63,11 @@ public class Main extends Application {
Platform.runLater(() -> {
Alert alert = new Alert(Alert.AlertType.ERROR, "G-Earth needs admin privileges in order to work properly, please restart G-Earth with admin permissions unless you know what you're doing", ButtonType.OK);
alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
alert.setResizable(true);
alert.onShownProperty().addListener(e -> {
Platform.runLater(() -> alert.setResizable(false));
});
alert.setResizable(false);
// alert.setResizable(true);
// alert.onShownProperty().addListener(e -> {
// Platform.runLater(() -> alert.setResizable(false));
// });
alert.show();
});
@ -98,10 +102,11 @@ public class Main extends Application {
webView.getEngine().loadContent("<html>A new version of G-Earth has been found ("+gitv+")<br><br>Update to the latest version:<br><a href=\"https://github.com/sirjonasxx/G-Earth/releases\">https://github.com/sirjonasxx/G-Earth/releases</a></html>");
webView.setPrefSize(500, 200);
alert.setResizable(true);
alert.onShownProperty().addListener(e -> {
Platform.runLater(() -> alert.setResizable(false));
});
alert.setResizable(false);
// alert.setResizable(true);
// alert.onShownProperty().addListener(e -> {
// Platform.runLater(() -> alert.setResizable(false));
// });
alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
alert.getDialogPane().setContent(fp);