mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-06-04 13:05:31 -04:00
Bookshelf: separated current selected and unselected highlight color
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user