From 151cf5271835e8464883bc4aa845b52f1aa1f4c0 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 29 Jan 2021 13:15:38 +1000 Subject: [PATCH] vary sidebar highlight with theme --- qt/aqt/sidebar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/aqt/sidebar.py b/qt/aqt/sidebar.py index b12029efc..0e6656230 100644 --- a/qt/aqt/sidebar.py +++ b/qt/aqt/sidebar.py @@ -296,8 +296,8 @@ class SidebarTreeView(QTreeView): return super().drawRow(painter, options, idx) if not (item := self.model().item_for_index(idx)): return super().drawRow(painter, options, idx) - if self.current_search.lower() in item.full_name.lower(): - brush = QBrush(QColor("lightyellow")) + if self.current_search.lower() in item.name.lower(): + brush = QBrush(theme_manager.qcolor("suspended-bg")) painter.save() painter.fillRect(options.rect, brush) painter.restore()