~exprez135/cryptomator-libre

f36f9d412cafa66384bc265003fe785d9f429eaf — Martin Beyer 1 year, 6 months ago 675a0b1
Fixes #1203

M main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockController.java => main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockController.java +1 -5
@@ 74,7 74,7 @@ public class UnlockController implements FxController {
		this.unlockButtonContentDisplay = Bindings.createObjectBinding(this::getUnlockButtonContentDisplay, passwordEntryLock.awaitingInteraction());
		this.userInteractionDisabled = passwordEntryLock.awaitingInteraction().not();
		this.unlockButtonDisabled = new SimpleBooleanProperty();
		this.window.setOnCloseRequest(windowEvent -> close());
		this.window.setOnCloseRequest(windowEvent -> cancel());
	}

	@FXML


@@ 128,10 128,6 @@ public class UnlockController implements FxController {
	@FXML
	public void cancel() {
		LOG.debug("Unlock canceled by user.");
		close();
	}

	private void close() {
		window.close();
		passwordEntryLock.interacted(UnlockModule.PasswordEntry.CANCELED);
	}

M main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java => main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java +6 -0
@@ 5,6 5,7 @@ import javafx.application.Platform;
import javafx.concurrent.Task;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.Window;
import org.cryptomator.common.vaults.Vault;
import org.cryptomator.common.vaults.VaultState;
import org.cryptomator.common.vaults.Volume;


@@ 112,6 113,11 @@ public class UnlockWorkflow extends Task<Boolean> {
		Platform.runLater(() -> {
			window.setScene(unlockScene.get());
			window.show();
			Window owner = window.getOwner();
			if (owner != null) {
				window.setX(owner.getX() + (owner.getWidth() - window.getWidth()) / 2);
				window.setY(owner.getY() + (owner.getHeight() - window.getHeight()) / 2);
			} else window.centerOnScreen();
			if (animateShake) {
				Animations.createShakeWindowAnimation(window).play();
			}