From 8c9424510278705c7c92c7a505ba9bcfb8a05ff0 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Sun, 25 Aug 2019 00:34:16 +0200 Subject: [PATCH] updated menu item stylings of choicebox, updated window sizes & disabled resizable of preferences and vault options --- .../ui/preferences/PreferencesModule.java | 3 +-- .../ui/vaultoptions/VaultOptionsModule.java | 4 +--- main/ui/src/main/resources/css/dark_theme.css | 18 +++++++++++++++++- main/ui/src/main/resources/css/light_theme.css | 18 +++++++++++++++++- .../src/main/resources/fxml/preferences.fxml | 2 +- .../src/main/resources/fxml/vault_options.fxml | 2 +- 6 files changed, 38 insertions(+), 9 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/preferences/PreferencesModule.java b/main/ui/src/main/java/org/cryptomator/ui/preferences/PreferencesModule.java index c968ea230..a2e175b89 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/preferences/PreferencesModule.java +++ b/main/ui/src/main/java/org/cryptomator/ui/preferences/PreferencesModule.java @@ -35,8 +35,7 @@ abstract class PreferencesModule { static Stage provideStage(ResourceBundle resourceBundle) { Stage stage = new Stage(); stage.setTitle(resourceBundle.getString("preferences.title")); - stage.setMinWidth(400); - stage.setMinHeight(300); + stage.setResizable(false); return stage; } diff --git a/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsModule.java b/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsModule.java index aa6d42ae2..499058de7 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsModule.java +++ b/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) { Stage stage = new Stage(); stage.setTitle(vault.getDisplayableName()); - // stage.setTitle(resourceBundle.getString("vaultOptions.title")); - stage.setMinWidth(400); - stage.setMinHeight(300); + stage.setResizable(false); stage.initStyle(StageStyle.DECORATED); stage.initModality(Modality.WINDOW_MODAL); stage.initOwner(owner); diff --git a/main/ui/src/main/resources/css/dark_theme.css b/main/ui/src/main/resources/css/dark_theme.css index 8cc599727..6732c1a91 100644 --- a/main/ui/src/main/resources/css/dark_theme.css +++ b/main/ui/src/main/resources/css/dark_theme.css @@ -579,6 +579,7 @@ -fx-background-insets: 0, 1px; -fx-background-radius: 4px; -fx-padding: 0.2em 0 0.2em 0; + -fx-translate-x: -1.4em; } .context-menu { @@ -590,7 +591,22 @@ } .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; } /******************************************************************************* diff --git a/main/ui/src/main/resources/css/light_theme.css b/main/ui/src/main/resources/css/light_theme.css index 2a7383913..337d64c9a 100644 --- a/main/ui/src/main/resources/css/light_theme.css +++ b/main/ui/src/main/resources/css/light_theme.css @@ -579,6 +579,7 @@ -fx-background-insets: 0, 1px; -fx-background-radius: 4px; -fx-padding: 0.2em 0 0.2em 0; + -fx-translate-x: -1.4em; } .context-menu { @@ -590,7 +591,22 @@ } .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; } /******************************************************************************* diff --git a/main/ui/src/main/resources/fxml/preferences.fxml b/main/ui/src/main/resources/fxml/preferences.fxml index 652ca9671..34ea44235 100644 --- a/main/ui/src/main/resources/fxml/preferences.fxml +++ b/main/ui/src/main/resources/fxml/preferences.fxml @@ -7,7 +7,7 @@ xmlns:fx="http://javafx.com/fxml" fx:id="tabPane" fx:controller="org.cryptomator.ui.preferences.PreferencesController" - side="TOP" + minWidth="400" tabClosingPolicy="UNAVAILABLE" tabDragPolicy="FIXED"> diff --git a/main/ui/src/main/resources/fxml/vault_options.fxml b/main/ui/src/main/resources/fxml/vault_options.fxml index 43241912d..20910a66e 100644 --- a/main/ui/src/main/resources/fxml/vault_options.fxml +++ b/main/ui/src/main/resources/fxml/vault_options.fxml @@ -7,7 +7,7 @@ xmlns:fx="http://javafx.com/fxml" fx:id="tabPane" fx:controller="org.cryptomator.ui.vaultoptions.VaultOptionsController" - side="TOP" + minWidth="400" tabClosingPolicy="UNAVAILABLE" tabDragPolicy="FIXED">