瀏覽代碼

no longer change window size during unlock workflow

Sebastian Stenzel 5 年之前
父節點
當前提交
7bbbd3c849
共有 2 個文件被更改,包括 34 次插入20 次删除
  1. 8 3
      main/ui/src/main/resources/fxml/unlock2.fxml
  2. 26 17
      main/ui/src/main/resources/fxml/unlock_success.fxml

+ 8 - 3
main/ui/src/main/resources/fxml/unlock2.fxml

@@ -8,19 +8,24 @@
 <?import javafx.scene.layout.VBox?>
 <?import org.cryptomator.ui.controls.FormattedLabel?>
 <?import org.cryptomator.ui.controls.SecPasswordField?>
+<?import javafx.scene.layout.Region?>
 <VBox xmlns="http://javafx.com/javafx"
 	  xmlns:fx="http://javafx.com/fxml"
 	  fx:controller="org.cryptomator.ui.unlock.UnlockController"
-	  minWidth="300"
-	  maxWidth="300"
+	  minWidth="350"
+	  maxWidth="350"
+	  minHeight="150"
 	  spacing="6">
 	<padding>
 		<Insets bottom="12.0" left="12.0" right="12.0" top="12.0"/>
 	</padding>
 	<children>
-		<FormattedLabel format="%unlock.passwordPrompt" arg1="${controller.vault.displayableName}" />
+		<FormattedLabel format="%unlock.passwordPrompt" arg1="${controller.vault.displayableName}"/>
 		<SecPasswordField fx:id="passwordField"/>
 		<CheckBox fx:id="savePassword" text="%unlock.savePassword" onAction="#didClickSavePasswordCheckbox"/>
+
+		<Region VBox.vgrow="ALWAYS"/>
+
 		<HBox alignment="CENTER_RIGHT" spacing="9">
 			<Button text="%generic.button.cancel" cancelButton="true" onAction="#cancel"/>
 			<Button text="%unlock.unlockBtn" defaultButton="true" onAction="#unlock" contentDisplay="${controller.unlockButtonState}" disable="${controller.unlockButtonDisabled}">

+ 26 - 17
main/ui/src/main/resources/fxml/unlock_success.fxml

@@ -4,38 +4,47 @@
 <?import javafx.scene.control.Button?>
 <?import javafx.scene.control.ProgressIndicator?>
 <?import javafx.scene.layout.HBox?>
+<?import javafx.scene.layout.Region?>
 <?import javafx.scene.layout.StackPane?>
 <?import javafx.scene.layout.VBox?>
 <?import org.cryptomator.ui.controls.FontAwesome5IconView?>
 <?import org.cryptomator.ui.controls.FormattedLabel?>
-<VBox xmlns="http://javafx.com/javafx"
+<HBox xmlns="http://javafx.com/javafx"
 	  xmlns:fx="http://javafx.com/fxml"
 	  fx:controller="org.cryptomator.ui.unlock.UnlockSuccessController"
-	  minWidth="300"
-	  maxWidth="300"
+	  minWidth="350"
+	  maxWidth="350"
+	  minHeight="150"
 	  spacing="12"
-	  alignment="CENTER">
+	  alignment="CENTER_LEFT">
 	<padding>
 		<Insets bottom="12.0" left="12.0" right="12.0" top="12.0"/>
 	</padding>
 	<children>
-		<StackPane alignment="CENTER">
+		<StackPane alignment="CENTER" HBox.hgrow="NEVER">
 			<VBox.margin>
 				<Insets topRightBottomLeft="24"/>
 			</VBox.margin>
-			<FontAwesome5IconView styleClass="glyph-icon-primary" glyph="CIRCLE" HBox.hgrow="NEVER" glyphSize="64"/>
-			<FontAwesome5IconView styleClass="glyph-icon-main-bg" glyph="CHECK" HBox.hgrow="NEVER" glyphSize="32"/>
+			<FontAwesome5IconView styleClass="glyph-icon-primary" glyph="CIRCLE" glyphSize="64"/>
+			<FontAwesome5IconView styleClass="glyph-icon-main-bg" glyph="CHECK" glyphSize="32"/>
 		</StackPane>
 
-		<FormattedLabel format="%unlock.success.message" arg1="${controller.vault.displayableName}" wrapText="true" textAlignment="CENTER"/>
+		<VBox spacing="12" HBox.hgrow="ALWAYS">
+			<padding>
+				<Insets top="24"/>
+			</padding>
+			<FormattedLabel format="%unlock.success.message" arg1="${controller.vault.displayableName}" wrapText="true" textAlignment="CENTER"/>
 
-		<HBox alignment="CENTER_RIGHT" spacing="9">
-			<Button text="%generic.button.done" cancelButton="true" onAction="#close"/>
-			<Button text="%unlock.success.reveal" defaultButton="true" onAction="#revealAndClose" contentDisplay="${controller.revealButtonState}">
-				<graphic>
-					<ProgressIndicator progress="-1" prefWidth="12" prefHeight="12"/>
-				</graphic>
-			</Button>
-		</HBox>
+			<Region VBox.vgrow="ALWAYS"/>
+
+			<HBox alignment="CENTER_RIGHT" spacing="9">
+				<Button text="%generic.button.done" cancelButton="true" onAction="#close"/>
+				<Button text="%unlock.success.reveal" defaultButton="true" onAction="#revealAndClose" contentDisplay="${controller.revealButtonState}">
+					<graphic>
+						<ProgressIndicator progress="-1" prefWidth="12" prefHeight="12"/>
+					</graphic>
+				</Button>
+			</HBox>
+		</VBox>
 	</children>
-</VBox>
+</HBox>