From 1b6f7d4a90592bb35a3b831a88aed8d3d052e270 Mon Sep 17 00:00:00 2001
From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com>
Date: Fri, 24 Apr 2020 14:31:40 +0200
Subject: [PATCH] wayland/kde fix made windows version resizeable
---
G-Earth/src/main/java/gearth/Main.java | 29 +++++++++++++++-----------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/G-Earth/src/main/java/gearth/Main.java b/G-Earth/src/main/java/gearth/Main.java
index 6df29a9..cb8884c 100644
--- a/G-Earth/src/main/java/gearth/Main.java
+++ b/G-Earth/src/main/java/gearth/Main.java
@@ -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("A new version of G-Earth has been found ("+gitv+")
Update to the latest version:
https://github.com/sirjonasxx/G-Earth/releases");
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);