From 118a1411d8998908923236c78b749cb0e5cd4c57 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Wed, 9 Oct 2024 16:55:56 +0200 Subject: [PATCH] fixed empty vaultList contextMenu --- .../ui/mainwindow/VaultListController.java | 4 ++++ src/main/resources/fxml/vault_list.fxml | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java index 37b9841d0..4b9732e19 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java @@ -112,6 +112,10 @@ public class VaultListController implements FxController { vaultList.setItems(vaults); vaultList.setCellFactory(cellFactory); + vaultList.prefHeightProperty().bind( + vaultList.fixedCellSizeProperty().multiply(Bindings.size(vaultList.getItems())) + ); + selectedVault.bind(vaultList.getSelectionModel().selectedItemProperty()); vaults.addListener((ListChangeListener.Change c) -> { while (c.next()) { diff --git a/src/main/resources/fxml/vault_list.fxml b/src/main/resources/fxml/vault_list.fxml index ae0905d4e..267148d3e 100644 --- a/src/main/resources/fxml/vault_list.fxml +++ b/src/main/resources/fxml/vault_list.fxml @@ -18,11 +18,14 @@ minWidth="206"> - - - - - + + + + + + + +