Browse Source

updated menu item stylings of choicebox, updated window sizes & disabled resizable of preferences and vault options

Tobias Hagemann 5 years ago
parent
commit
8c94245102

+ 1 - 2
main/ui/src/main/java/org/cryptomator/ui/preferences/PreferencesModule.java

@@ -35,8 +35,7 @@ abstract class PreferencesModule {
 	static Stage provideStage(ResourceBundle resourceBundle) {
 	static Stage provideStage(ResourceBundle resourceBundle) {
 		Stage stage = new Stage();
 		Stage stage = new Stage();
 		stage.setTitle(resourceBundle.getString("preferences.title"));
 		stage.setTitle(resourceBundle.getString("preferences.title"));
-		stage.setMinWidth(400);
-		stage.setMinHeight(300);
+		stage.setResizable(false);
 		return stage;
 		return stage;
 	}
 	}
 
 

+ 1 - 3
main/ui/src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsModule.java

@@ -39,9 +39,7 @@ abstract class VaultOptionsModule {
 	static Stage provideStage(@MainWindow Stage owner, @VaultOptionsWindow Vault vault, ResourceBundle resourceBundle) {
 	static Stage provideStage(@MainWindow Stage owner, @VaultOptionsWindow Vault vault, ResourceBundle resourceBundle) {
 		Stage stage = new Stage();
 		Stage stage = new Stage();
 		stage.setTitle(vault.getDisplayableName());
 		stage.setTitle(vault.getDisplayableName());
-		// stage.setTitle(resourceBundle.getString("vaultOptions.title"));
-		stage.setMinWidth(400);
-		stage.setMinHeight(300);
+		stage.setResizable(false);
 		stage.initStyle(StageStyle.DECORATED);
 		stage.initStyle(StageStyle.DECORATED);
 		stage.initModality(Modality.WINDOW_MODAL);
 		stage.initModality(Modality.WINDOW_MODAL);
 		stage.initOwner(owner);
 		stage.initOwner(owner);

+ 17 - 1
main/ui/src/main/resources/css/dark_theme.css

@@ -579,6 +579,7 @@
 	-fx-background-insets: 0, 1px;
 	-fx-background-insets: 0, 1px;
 	-fx-background-radius: 4px;
 	-fx-background-radius: 4px;
 	-fx-padding: 0.2em 0 0.2em 0;
 	-fx-padding: 0.2em 0 0.2em 0;
+	-fx-translate-x: -1.4em;
 }
 }
 
 
 .context-menu {
 .context-menu {
@@ -590,7 +591,22 @@
 }
 }
 
 
 .menu-item:focused {
 .menu-item:focused {
-	-fx-background-color: CONTROL_BG_ARMED;
+	-fx-background-color: transparent, CONTROL_BG_ARMED;
+	-fx-background-insets: 0, 0 1px 0 1px;
+}
+
+.menu-item > .left-container {
+	-fx-padding: 0.5em 0.25em 0.5em 0.5em;
+}
+
+.menu-item > .label {
+    -fx-padding: 1px 0.5em 1px 0.5em;
+}
+
+.radio-menu-item:checked > .left-container > .radio {
+	-fx-background-color: TEXT_FILL;
+	-fx-shape: "M-1,4, L-1,5.5 L3.5,8.5 L9,0 L9,-1 L7,-1 L3,6 L1,4 Z";
+	-fx-scale-shape: false;
 }
 }
 
 
 /*******************************************************************************
 /*******************************************************************************

+ 17 - 1
main/ui/src/main/resources/css/light_theme.css

@@ -579,6 +579,7 @@
 	-fx-background-insets: 0, 1px;
 	-fx-background-insets: 0, 1px;
 	-fx-background-radius: 4px;
 	-fx-background-radius: 4px;
 	-fx-padding: 0.2em 0 0.2em 0;
 	-fx-padding: 0.2em 0 0.2em 0;
+	-fx-translate-x: -1.4em;
 }
 }
 
 
 .context-menu {
 .context-menu {
@@ -590,7 +591,22 @@
 }
 }
 
 
 .menu-item:focused {
 .menu-item:focused {
-	-fx-background-color: CONTROL_BG_ARMED;
+	-fx-background-color: transparent, CONTROL_BG_ARMED;
+	-fx-background-insets: 0, 0 1px 0 1px;
+}
+
+.menu-item > .left-container {
+	-fx-padding: 0.5em 0.25em 0.5em 0.5em;
+}
+
+.menu-item > .label {
+    -fx-padding: 1px 0.5em 1px 0.5em;
+}
+
+.radio-menu-item:checked > .left-container > .radio {
+	-fx-background-color: TEXT_FILL;
+	-fx-shape: "M-1,4, L-1,5.5 L3.5,8.5 L9,0 L9,-1 L7,-1 L3,6 L1,4 Z";
+	-fx-scale-shape: false;
 }
 }
 
 
 /*******************************************************************************
 /*******************************************************************************

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

@@ -7,7 +7,7 @@
 		 xmlns:fx="http://javafx.com/fxml"
 		 xmlns:fx="http://javafx.com/fxml"
 		 fx:id="tabPane"
 		 fx:id="tabPane"
 		 fx:controller="org.cryptomator.ui.preferences.PreferencesController"
 		 fx:controller="org.cryptomator.ui.preferences.PreferencesController"
-		 side="TOP"
+		 minWidth="400"
 		 tabClosingPolicy="UNAVAILABLE"
 		 tabClosingPolicy="UNAVAILABLE"
 		 tabDragPolicy="FIXED">
 		 tabDragPolicy="FIXED">
 	<tabs>
 	<tabs>

+ 1 - 1
main/ui/src/main/resources/fxml/vault_options.fxml

@@ -7,7 +7,7 @@
 		 xmlns:fx="http://javafx.com/fxml"
 		 xmlns:fx="http://javafx.com/fxml"
 		 fx:id="tabPane"
 		 fx:id="tabPane"
 		 fx:controller="org.cryptomator.ui.vaultoptions.VaultOptionsController"
 		 fx:controller="org.cryptomator.ui.vaultoptions.VaultOptionsController"
-		 side="TOP"
+		 minWidth="400"
 		 tabClosingPolicy="UNAVAILABLE"
 		 tabClosingPolicy="UNAVAILABLE"
 		 tabDragPolicy="FIXED">
 		 tabDragPolicy="FIXED">
 	<tabs>
 	<tabs>