mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-20 09:36:55 -04:00
stage cleanup
This commit is contained in:
@@ -52,7 +52,6 @@ public abstract class AddVaultModule {
|
||||
Stage stage = new Stage();
|
||||
stage.setTitle(resourceBundle.getString("addvaultwizard.title"));
|
||||
stage.setResizable(false);
|
||||
stage.initStyle(StageStyle.DECORATED);
|
||||
stage.initModality(Modality.WINDOW_MODAL);
|
||||
stage.initOwner(owner);
|
||||
stage.sceneProperty().addListener(observable -> {
|
||||
|
||||
@@ -42,14 +42,13 @@ abstract class MainWindowModule {
|
||||
@MainWindow
|
||||
@MainWindowScoped
|
||||
static Stage provideStage(@Named("windowIcon") Optional<Image> windowIcon) {
|
||||
Stage stage = new Stage();
|
||||
Stage stage = new Stage(StageStyle.UNDECORATED);
|
||||
// TODO: min/max values chosen arbitrarily. We might wanna take a look at the user's resolution...
|
||||
stage.setMinWidth(650);
|
||||
stage.setMinHeight(440);
|
||||
stage.setMaxWidth(1000);
|
||||
stage.setMaxHeight(700);
|
||||
stage.setTitle("Cryptomator");
|
||||
stage.initStyle(StageStyle.UNDECORATED);
|
||||
windowIcon.ifPresent(stage.getIcons()::add);
|
||||
return stage;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.cryptomator.ui.common.FxController;
|
||||
import org.cryptomator.ui.common.FxControllerKey;
|
||||
import org.cryptomator.ui.common.FxmlFile;
|
||||
import org.cryptomator.ui.common.FxmlScene;
|
||||
import org.cryptomator.ui.mainwindow.MainWindow;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Provider;
|
||||
@@ -36,11 +37,12 @@ abstract class RemoveVaultModule {
|
||||
@Provides
|
||||
@RemoveVault
|
||||
@RemoveVaultScoped
|
||||
static Stage provideStage(ResourceBundle resourceBundle, @Named("windowIcon") Optional<Image> windowIcon) {
|
||||
static Stage provideStage(@MainWindow Stage owner, ResourceBundle resourceBundle, @Named("windowIcon") Optional<Image> windowIcon) {
|
||||
Stage stage = new Stage();
|
||||
stage.setTitle(resourceBundle.getString("removeVault.title"));
|
||||
stage.setResizable(false);
|
||||
stage.initModality(Modality.APPLICATION_MODAL);
|
||||
stage.initModality(Modality.WINDOW_MODAL);
|
||||
stage.initOwner(owner);
|
||||
windowIcon.ifPresent(stage.getIcons()::add);
|
||||
return stage;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ abstract class VaultOptionsModule {
|
||||
Stage stage = new Stage();
|
||||
stage.setTitle(vault.getDisplayableName());
|
||||
stage.setResizable(false);
|
||||
stage.initStyle(StageStyle.DECORATED);
|
||||
stage.initModality(Modality.WINDOW_MODAL);
|
||||
stage.initOwner(owner);
|
||||
windowIcon.ifPresent(stage.getIcons()::add);
|
||||
|
||||
Reference in New Issue
Block a user