From 21774784a1916110bdf6a28b285acc37cd365e9c Mon Sep 17 00:00:00 2001 From: Martin Beyer Date: Fri, 17 Sep 2021 18:51:09 +0200 Subject: [PATCH] Reduce ResizeRegion to 6px, only save positions at MouseRelease --- .../ui/mainwindow/ResizeController.java | 11 ++++++----- src/main/resources/fxml/main_window_resize.fxml | 16 ++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/ResizeController.java b/src/main/java/org/cryptomator/ui/mainwindow/ResizeController.java index 3642cc0b6..448d54d91 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/ResizeController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/ResizeController.java @@ -31,6 +31,10 @@ public class ResizeController implements FxController { public Region rResizer; public Region bResizer; public Region lResizer; + public Region lDefaultRegion; + public Region tDefaultRegion; + public Region rDefaultRegion; + public Region bDefaultRegion; private double origX, origY, origW, origH; @@ -134,7 +138,6 @@ public class ResizeController implements FxController { window.setY(newY); window.setHeight(newH); } - savePositionalSettings(); } @FXML @@ -147,7 +150,6 @@ public class ResizeController implements FxController { window.setX(newX); window.setWidth(newW); } - savePositionalSettings(); } @FXML @@ -156,7 +158,6 @@ public class ResizeController implements FxController { if (newH < window.getMaxHeight() && newH > window.getMinHeight()) { window.setHeight(newH); } - savePositionalSettings(); } @FXML @@ -165,10 +166,10 @@ public class ResizeController implements FxController { if (newW < window.getMaxWidth() && newW > window.getMinWidth()) { window.setWidth(newW); } - savePositionalSettings(); } - private void savePositionalSettings() { + @FXML + public void savePositionalSettings() { settings.windowHeightProperty().setValue(window.getHeight()); settings.windowWidthProperty().setValue(window.getWidth()); settings.windowYPositionProperty().setValue(window.getY()); diff --git a/src/main/resources/fxml/main_window_resize.fxml b/src/main/resources/fxml/main_window_resize.fxml index 108b0962b..7d5fb9437 100644 --- a/src/main/resources/fxml/main_window_resize.fxml +++ b/src/main/resources/fxml/main_window_resize.fxml @@ -14,14 +14,14 @@ - - - - - - - - + + + + + + + +