Просмотр исходного кода

updated button paddings, unlock dialog layout, localizations [ci skip]

Tobias Hagemann 6 лет назад
Родитель
Сommit
111d20a1cf

+ 3 - 3
main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockModule.java

@@ -30,10 +30,10 @@ abstract class UnlockModule {
 	@Provides
 	@UnlockWindow
 	@UnlockScoped
-	static Stage provideStage() {
+	static Stage provideStage(ResourceBundle resourceBundle) {
 		Stage stage = new Stage();
-		stage.setMinWidth(300);
-		stage.setMinHeight(200);
+		stage.setTitle(resourceBundle.getString("unlock.title"));
+		stage.setResizable(false);
 		stage.initModality(Modality.APPLICATION_MODAL);
 		return stage;
 	}

+ 8 - 5
main/ui/src/main/resources/css/dark_theme.css

@@ -71,6 +71,7 @@
 	-fx-pref-height: 30px;
 	-fx-pref-width: 30px;
 	-fx-background-color: none;
+	-fx-padding: 0;
 }
 
 .main-window .title .button .fa-icon {
@@ -108,7 +109,8 @@
 	-fx-background-color: PRIMARY_BG, INDICATOR_BG;
 	-fx-background-insets: 0, 1px;
 	-fx-background-radius: 5px, 4px;
-	-fx-translate-x: 4px;
+	-fx-translate-x: -1px;
+	-fx-translate-y: 1px;
 }
 
 /*******************************************************************************
@@ -141,7 +143,7 @@
 	-fx-background-color: CONTROL_BORDER_NORMAL, MAIN_BG;
 	-fx-background-insets: 0 0 1px 0, 1px;
 	-fx-background-radius: 4px 4px 0 0;
-	-fx-padding: 0.2em 0.4em 0.2em 0.4em;
+	-fx-padding: 0.2em 1em 0.2em 1em;
 }
 
 .tab-pane > .tab-header-area > .headers-region > .tab:selected {
@@ -219,12 +221,13 @@
 
 .toolbar-container .button {
 	-fx-pref-height: 30px;
-	-fx-pref-width: 30px;
+	-fx-pref-width: 31px;
 	-fx-background-color: transparent;
 	-fx-background-insets: 0;
 	-fx-background-radius: 0;
 	-fx-border-color: transparent CONTROL_BORDER_NORMAL transparent transparent;
-	-fx-border-width: 1;
+	-fx-border-width: 0 1px 0 0;
+	-fx-padding: 0;
 }
 
 .toolbar-container .button:focused {
@@ -318,7 +321,7 @@
 	-fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_NORMAL;
 	-fx-background-insets: 0, 1px;
 	-fx-background-radius: 4px;
-	-fx-padding: 0.2em 0.4em 0.2em 0.4em;
+	-fx-padding: 0.2em 1em 0.2em 1em;
 }
 
 .button:focused {

+ 8 - 5
main/ui/src/main/resources/css/light_theme.css

@@ -71,6 +71,7 @@
 	-fx-pref-height: 30px;
 	-fx-pref-width: 30px;
 	-fx-background-color: none;
+	-fx-padding: 0;
 }
 
 .main-window .title .button .fa-icon {
@@ -108,7 +109,8 @@
 	-fx-background-color: PRIMARY_BG, INDICATOR_BG;
 	-fx-background-insets: 0, 1px;
 	-fx-background-radius: 5px, 4px;
-	-fx-translate-x: 4px;
+	-fx-translate-x: -1px;
+	-fx-translate-y: 1px;
 }
 
 /*******************************************************************************
@@ -141,7 +143,7 @@
 	-fx-background-color: CONTROL_BORDER_NORMAL, MAIN_BG;
 	-fx-background-insets: 0 0 1px 0, 1px;
 	-fx-background-radius: 4px 4px 0 0;
-	-fx-padding: 0.2em 0.4em 0.2em 0.4em;
+	-fx-padding: 0.2em 1em 0.2em 1em;
 }
 
 .tab-pane > .tab-header-area > .headers-region > .tab:selected {
@@ -219,12 +221,13 @@
 
 .toolbar-container .button {
 	-fx-pref-height: 30px;
-	-fx-pref-width: 30px;
+	-fx-pref-width: 31px;
 	-fx-background-color: transparent;
 	-fx-background-insets: 0;
 	-fx-background-radius: 0;
 	-fx-border-color: transparent CONTROL_BORDER_NORMAL transparent transparent;
-	-fx-border-width: 1;
+	-fx-border-width: 0 1px 0 0;
+	-fx-padding: 0;
 }
 
 .toolbar-container .button:focused {
@@ -318,7 +321,7 @@
 	-fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_NORMAL;
 	-fx-background-insets: 0, 1px;
 	-fx-background-radius: 4px;
-	-fx-padding: 0.2em 0.4em 0.2em 0.4em;
+	-fx-padding: 0.2em 1em 0.2em 1em;
 }
 
 .button:focused {

+ 2 - 2
main/ui/src/main/resources/fxml/preferences.fxml

@@ -10,12 +10,12 @@
 		 tabClosingPolicy="UNAVAILABLE"
 		 tabDragPolicy="FIXED">
 	<tabs>
-		<Tab fx:id="generalTab" text="TODO General">
+		<Tab fx:id="generalTab" text="%preferences.general">
 			<content>
 				<fx:include source="/fxml/preferences_general.fxml"/>
 			</content>
 		</Tab>
-		<Tab fx:id="updatesTab" text="TODO Updates">
+		<Tab fx:id="updatesTab" text="%preferences.updates">
 			<content>
 				<fx:include source="/fxml/preferences_updates.fxml"/>
 			</content>

+ 4 - 4
main/ui/src/main/resources/fxml/preferences_general.fxml

@@ -17,16 +17,16 @@
 	</padding>
 	<children>
 		<HBox spacing="6" alignment="BASELINE_LEFT">
-			<Label text="%preferences.theme"/>
+			<Label text="%preferences.general.theme"/>
 			<ChoiceBox fx:id="themeChoiceBox"/>
 		</HBox>
 
-		<CheckBox fx:id="startHiddenCheckbox" text="%preferences.startHidden"/>
+		<CheckBox fx:id="startHiddenCheckbox" text="%preferences.general.startHidden"/>
 
-		<CheckBox fx:id="debugModeCheckbox" text="%preferences.debugLogging"/>
+		<CheckBox fx:id="debugModeCheckbox" text="%preferences.general.debugLogging"/>
 
 		<HBox spacing="6" alignment="BASELINE_LEFT">
-			<Label text="%preferences.volumeType"/>
+			<Label text="%preferences.general.volumeType"/>
 			<ChoiceBox fx:id="volumeTypeChoicBox"/>
 		</HBox>
 

+ 3 - 3
main/ui/src/main/resources/fxml/preferences_updates.fxml

@@ -15,14 +15,14 @@
 		<Insets bottom="12" left="12" right="12" top="12"/>
 	</padding>
 	<children>
-		<CheckBox fx:id="checkForUpdatesCheckbox" text="%preferences.autoUpdateCheck"/>
+		<CheckBox fx:id="checkForUpdatesCheckbox" text="%preferences.updates.autoUpdateCheck"/>
 
-		<Button text="TODO check now!" defaultButton="true" onAction="#checkNow" contentDisplay="${controller.checkForUpdatesButtonState}">
+		<Button text="%preferences.updates.checkNowBtn" defaultButton="true" onAction="#checkNow" contentDisplay="${controller.checkForUpdatesButtonState}">
 			<graphic>
 				<ProgressIndicator progress="-1" prefWidth="12" prefHeight="12"/>
 			</graphic>
 		</Button>
-		
+
 		<TextFlow styleClass="text-flow" visible="${controller.updateAvailable}" textAlignment="CENTER">
 			<Text text="TODO Update to version "/>
 			<Text text="${controller.latestVersion}"/>

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

@@ -5,7 +5,6 @@
 <?import javafx.scene.control.CheckBox?>
 <?import javafx.scene.control.ProgressIndicator?>
 <?import javafx.scene.layout.HBox?>
-<?import javafx.scene.layout.Region?>
 <?import javafx.scene.layout.VBox?>
 <?import javafx.scene.text.Text?>
 <?import javafx.scene.text.TextFlow?>
@@ -14,21 +13,23 @@
 	  xmlns:fx="http://javafx.com/fxml"
 	  fx:controller="org.cryptomator.ui.unlock.UnlockController"
 	  minWidth="300"
+	  maxWidth="300"
 	  spacing="6">
 	<padding>
 		<Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/>
 	</padding>
 	<children>
 		<TextFlow styleClass="text-flow">
-			<Text text="TODO Enter Password for "/>
+			<Text text="%unlock.passwordPrompt"/>
+			<Text text=" &quot;"/>
 			<Text text="${controller.vault.displayableName}"/>
+			<Text text="&quot;"/>
 		</TextFlow>
 		<SecPasswordField fx:id="passwordField"/>
-		<CheckBox fx:id="savePassword" text="TODO save password" onAction="#didClickSavePasswordCheckbox"/>
-		<HBox>
-			<Button text="TODO cancel" cancelButton="true" onAction="#cancel"/>
-			<Region HBox.hgrow="ALWAYS"/>
-			<Button text="TODO unlock" defaultButton="true" onAction="#unlock" contentDisplay="${controller.unlockButtonState}" disable="${controller.unlockButtonDisabled}">
+		<CheckBox fx:id="savePassword" text="%unlock.savePassword" onAction="#didClickSavePasswordCheckbox"/>
+		<HBox alignment="CENTER_RIGHT" spacing="6">
+			<Button text="%generic.button.cancel" cancelButton="true" onAction="#cancel"/>
+			<Button text="%unlock.unlockBtn" defaultButton="true" onAction="#unlock" contentDisplay="${controller.unlockButtonState}" disable="${controller.unlockButtonDisabled}">
 				<graphic>
 					<ProgressIndicator progress="-1" prefWidth="12" prefHeight="12"/>
 				</graphic>

+ 25 - 11
main/ui/src/main/resources/i18n/strings.properties

@@ -1,11 +1,12 @@
 #Generics
 ##Button
 generic.button.back=Back
+generic.button.cancel=Cancel
+generic.button.create=Create
 generic.button.next=Next
 generic.button.open=Open
-generic.button.create=Create
 
-#Add Vault Dialogues
+#Add Vault Dialogs
 ##Welcome
 addvaultwizard.welcome.instruction=TODO new vault or existing vault?
 addvaultwizard.welcome.newButton=TODO new vault
@@ -25,18 +26,31 @@ addvaultwizard.new.directoryPickerTitle=Select Directory
 addvaultwizard.new.enterPassword=Please enter a Password for your vault:
 addvaultwizard.new.reenterPassword=Please retype the password:
 
-
-main.closeBtn.tooltip=Close
-main.settingsBtn.tooltip=Settings
-preferences.title=Preferences
-preferences.autoUpdateCheck=Check for updates automatically
-preferences.debugLogging=Enable debug logging
-preferences.startHidden=Hide window when starting Cryptomator
-preferences.theme=Look & Feel
-preferences.volumeType=Volume type
+#Unlock
+unlock.title=Unlock Vault
+unlock.passwordPrompt=Enter Password for
+unlock.savePassword=Save Password
+unlock.unlockBtn=Unlock
+##Delete Saved Password Dialog
 unlock.deleteSavedPasswordDialog.title=Delete Saved Password
 unlock.deleteSavedPasswordDialog.header=Do you really want to delete the saved password of this vault?
 unlock.deleteSavedPasswordDialog.content=The saved password of this vault will be immediately deleted from your system keychain. If you'd like to save your password again, you'd have to unlock your vault with the "Save Password" option enabled.
+
+#Preferences
+preferences.title=Preferences
+##General
+preferences.general=General
+preferences.general.theme=Look & Feel
+preferences.general.startHidden=Hide window when starting Cryptomator
+preferences.general.debugLogging=Enable debug logging
+preferences.general.volumeType=Volume Type
+##Updates
+preferences.updates=Updates
+preferences.updates.autoUpdateCheck=Check for updates automatically
+preferences.updates.checkNowBtn=Check Now
+
+main.closeBtn.tooltip=Close
+main.settingsBtn.tooltip=Settings
 vaultlist.emptyList.onboardingInstruction=Click here to add a vault
 vaultOptions.mount.readonly=Read-Only
 vaultOptions.mount.driveName=Drive Name