From 6512d805747807b2bc803b9c331a7b5b24a58073 Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Sun, 4 Jan 2026 10:28:34 +0100 Subject: [PATCH] Bookshelf: separated current selected and unselected highlight color --- src/calibre/gui2/library/bookshelf_view.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/bookshelf_view.py b/src/calibre/gui2/library/bookshelf_view.py index f663becbee..4e8a614033 100644 --- a/src/calibre/gui2/library/bookshelf_view.py +++ b/src/calibre/gui2/library/bookshelf_view.py @@ -1803,8 +1803,10 @@ class BookshelfView(MomentumScrollMixin, QAbstractScrollArea): self.draw_selection_highlight(painter, spine_rect, color) def selection_highlight_color(self, is_selected: bool, is_current: bool) -> QColor: - if is_current: + if is_current and is_selected: return self.palette().color(QPalette.ColorRole.LinkVisited) + if is_current: + return self.palette().color(QPalette.ColorRole.Mid) if is_selected: return self.palette().color(QPalette.ColorRole.Highlight) return QColor()