vary sidebar highlight with theme

This commit is contained in:
Damien Elmes 2021-01-29 13:15:38 +10:00
parent 9584efc066
commit 151cf52718

View file

@ -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()