diff --git a/src/main/java/org/cryptomator/ui/eventview/EventListCellFactory.java b/src/main/java/org/cryptomator/ui/eventview/EventListCellFactory.java index e690fd039..61af45a92 100644 --- a/src/main/java/org/cryptomator/ui/eventview/EventListCellFactory.java +++ b/src/main/java/org/cryptomator/ui/eventview/EventListCellFactory.java @@ -2,7 +2,6 @@ package org.cryptomator.ui.eventview; import org.cryptomator.event.Event; import org.cryptomator.ui.common.FxmlLoaderFactory; -import org.cryptomator.ui.mainwindow.VaultListCellController; import javax.inject.Inject; import javafx.fxml.FXMLLoader; @@ -50,10 +49,11 @@ public class EventListCellFactory implements Callback, ListCell< protected void updateItem(Event item, boolean empty) { super.updateItem(item, empty); - if (empty) { - setText(null); + if (empty || item == null) { setGraphic(null); + this.getStyleClass().remove("list-cell"); } else { + this.getStyleClass().addLast("list-cell"); setContentDisplay(ContentDisplay.GRAPHIC_ONLY); setGraphic(root); controller.setEvent(item); diff --git a/src/main/resources/css/light_theme.css b/src/main/resources/css/light_theme.css index 9f9d83fb1..85d02ccab 100644 --- a/src/main/resources/css/light_theme.css +++ b/src/main/resources/css/light_theme.css @@ -299,6 +299,15 @@ * * ******************************************************************************/ +.event-window .list-view .list-cell:hover { + -fx-background-color: CONTROL_BG_SELECTED; +} + +.event-window .list-view .list-cell:selected { + -fx-background-color: PRIMARY, CONTROL_BG_SELECTED; + -fx-background-insets: 0, 0 0 0 3px; +} + .list-view { -fx-background-color: CONTROL_BG_NORMAL; }