From a810eff797381bef77b9731988f894e72aea394e Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 10 Feb 2025 18:27:06 +0100 Subject: [PATCH] make menu buttons in vault list appear clickable --- .../ui/mainwindow/VaultListController.java | 3 ++- src/main/resources/css/dark_theme.css | 22 ++++++++++++++++-- src/main/resources/css/light_theme.css | 18 +++++++++++++++ src/main/resources/fxml/vault_list.fxml | 23 +++++++++---------- 4 files changed, 51 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java index e353fe8ed..0c2c46204 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java @@ -26,6 +26,7 @@ import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.geometry.Side; +import javafx.scene.control.Button; import javafx.scene.control.ContextMenu; import javafx.scene.control.ListView; import javafx.scene.input.ContextMenuEvent; @@ -76,7 +77,7 @@ public class VaultListController implements FxController { public ListView vaultList; public StackPane root; @FXML - private HBox addVaultButton; + private Button addVaultButton; @FXML private ContextMenu addVaultContextMenu; diff --git a/src/main/resources/css/dark_theme.css b/src/main/resources/css/dark_theme.css index dae0d1898..72e732f36 100644 --- a/src/main/resources/css/dark_theme.css +++ b/src/main/resources/css/dark_theme.css @@ -183,19 +183,37 @@ } .main-window .button-bar { + -fx-min-height:44px; + -fx-max-height:44px; -fx-background-color: MAIN_BG; -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; -fx-border-width: 1px 0 0 0; } -.main-window .button-left { +.main-window .button-bar .button-left { -fx-border-color: CONTROL_BORDER_NORMAL; -fx-border-width: 0 1px 0 0; + -fx-background-color: MAIN_BG; + -fx-background-radius: 0px; + -fx-min-height: 44px; + -fx-max-height: 44px; } -.main-window .button-right { +.main-window .button-bar .button-right { -fx-border-color: CONTROL_BORDER_NORMAL; -fx-border-width: 0 0 0 1px; + -fx-background-color: MAIN_BG; + -fx-background-radius: 0px; + -fx-min-height: 44px; + -fx-max-height: 44px; +} + +.main-window .button-bar .button-left:armed { + -fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_ARMED; +} + +.main-window .button-bar .button-right:armed { + -fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_ARMED; } /******************************************************************************* diff --git a/src/main/resources/css/light_theme.css b/src/main/resources/css/light_theme.css index 84df05b10..76d14c239 100644 --- a/src/main/resources/css/light_theme.css +++ b/src/main/resources/css/light_theme.css @@ -182,6 +182,8 @@ } .main-window .button-bar { + -fx-min-height:44px; + -fx-max-height:44px; -fx-background-color: MAIN_BG; -fx-border-color: CONTROL_BORDER_NORMAL transparent transparent transparent; -fx-border-width: 1px 0 0 0; @@ -190,11 +192,27 @@ .main-window .button-bar .button-left { -fx-border-color: CONTROL_BORDER_NORMAL; -fx-border-width: 0 1px 0 0; + -fx-background-color: MAIN_BG; + -fx-background-radius: 0px; + -fx-min-height: 44px; + -fx-max-height: 44px; } .main-window .button-bar .button-right { -fx-border-color: CONTROL_BORDER_NORMAL; -fx-border-width: 0 0 0 1px; + -fx-background-color: MAIN_BG; + -fx-background-radius: 0px; + -fx-min-height: 44px; + -fx-max-height: 44px; +} + +.main-window .button-bar .button-left:armed { + -fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_ARMED; +} + +.main-window .button-bar .button-right:armed { + -fx-background-color: CONTROL_BORDER_NORMAL, CONTROL_BG_ARMED; } /******************************************************************************* diff --git a/src/main/resources/fxml/vault_list.fxml b/src/main/resources/fxml/vault_list.fxml index 267148d3e..161a29e87 100644 --- a/src/main/resources/fxml/vault_list.fxml +++ b/src/main/resources/fxml/vault_list.fxml @@ -11,6 +11,7 @@ + - - - - - - + - - - - - - +