mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-22 10:36:55 -04:00
update position in settings when moving
This commit is contained in:
@@ -76,11 +76,19 @@ public class MainWindowTitleController implements FxController {
|
||||
window.setX(event.getScreenX() - xOffset);
|
||||
window.setY(event.getScreenY() - yOffset);
|
||||
});
|
||||
titleBar.setOnMouseReleased(event -> {
|
||||
saveSettings();
|
||||
});
|
||||
window.setOnCloseRequest(event -> {
|
||||
close();
|
||||
event.consume();
|
||||
});
|
||||
}
|
||||
//TODO: almost duplicate from ResizeController.class
|
||||
private void saveSettings() {
|
||||
settings.windowYPositionProperty().setValue(window.getY());
|
||||
settings.windowXPositionProperty().setValue(window.getX());
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void close() {
|
||||
|
||||
Reference in New Issue
Block a user