mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-18 18:51:26 +00:00
simplified the code and removed the function
This commit is contained in:
@@ -104,13 +104,6 @@ public class UnlockWorkflow extends Task<Void> {
|
||||
appWindows.showErrorWindow(e, window, null);
|
||||
}
|
||||
|
||||
private void centerOnPrimaryStage(Window window){
|
||||
double centerXPosition = mainWindow.getX() + (mainWindow.getWidth() - window.getWidth()) / 2;
|
||||
double centerYPosition = mainWindow.getY() + (mainWindow.getHeight() - window.getHeight()) / 2;
|
||||
window.setX(centerXPosition);
|
||||
window.setY(centerYPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void succeeded() {
|
||||
LOG.info("Unlock of '{}' succeeded.", vault.getDisplayName());
|
||||
@@ -119,7 +112,8 @@ public class UnlockWorkflow extends Task<Void> {
|
||||
case ASK -> Platform.runLater(() -> {
|
||||
window.setScene(successScene.get());
|
||||
window.show();
|
||||
centerOnPrimaryStage(window);
|
||||
window.setX(mainWindow.getX() + (mainWindow.getWidth() - window.getWidth()) / 2);
|
||||
window.setY(mainWindow.getY() + (mainWindow.getHeight() - window.getHeight()) / 2);
|
||||
});
|
||||
case REVEAL -> {
|
||||
Platform.runLater(window::close);
|
||||
|
||||
Reference in New Issue
Block a user