mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
wayland/kde fix made windows version resizeable
This commit is contained in:
parent
b16e59595f
commit
1b6f7d4a90
@ -37,10 +37,13 @@ public class Main extends Application {
|
|||||||
|
|
||||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/gearth/G-EarthLogoSmaller.png")));
|
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/gearth/G-EarthLogoSmaller.png")));
|
||||||
|
|
||||||
primaryStage.setResizable(true);
|
// TODO fix
|
||||||
primaryStage.onShownProperty().addListener(e -> {
|
primaryStage.setResizable(false);
|
||||||
Platform.runLater(() -> primaryStage.setResizable(false));
|
// primaryStage.setResizable(true);
|
||||||
});
|
// primaryStage.onShownProperty().addListener(e -> {
|
||||||
|
// Platform.runLater(() -> primaryStage.setResizable(false));
|
||||||
|
// });
|
||||||
|
|
||||||
//primaryStage.initStyle(StageStyle.UNDECORATED);
|
//primaryStage.initStyle(StageStyle.UNDECORATED);
|
||||||
primaryStage.setTitle("G-Earth " + version);
|
primaryStage.setTitle("G-Earth " + version);
|
||||||
primaryStage.setScene(new Scene(root, 650, 295));
|
primaryStage.setScene(new Scene(root, 650, 295));
|
||||||
@ -60,10 +63,11 @@ public class Main extends Application {
|
|||||||
Platform.runLater(() -> {
|
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 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.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
|
||||||
alert.setResizable(true);
|
alert.setResizable(false);
|
||||||
alert.onShownProperty().addListener(e -> {
|
// alert.setResizable(true);
|
||||||
Platform.runLater(() -> alert.setResizable(false));
|
// alert.onShownProperty().addListener(e -> {
|
||||||
});
|
// Platform.runLater(() -> alert.setResizable(false));
|
||||||
|
// });
|
||||||
alert.show();
|
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.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);
|
webView.setPrefSize(500, 200);
|
||||||
|
|
||||||
alert.setResizable(true);
|
alert.setResizable(false);
|
||||||
alert.onShownProperty().addListener(e -> {
|
// alert.setResizable(true);
|
||||||
Platform.runLater(() -> alert.setResizable(false));
|
// alert.onShownProperty().addListener(e -> {
|
||||||
});
|
// Platform.runLater(() -> alert.setResizable(false));
|
||||||
|
// });
|
||||||
|
|
||||||
alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
|
alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
|
||||||
alert.getDialogPane().setContent(fp);
|
alert.getDialogPane().setContent(fp);
|
||||||
|
Loading…
Reference in New Issue
Block a user