mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ooops -- my change broke light theme. This fixes it.
This commit is contained in:
parent
9362da31ff
commit
bee3f5dfc1
@ -70,10 +70,11 @@ class TagDelegate(QStyledItemDelegate): # {{{
|
||||
def paint_text(self, painter, rect, flags, text, hover):
|
||||
painter.save()
|
||||
pen = painter.pen()
|
||||
if hover and QApplication.instance().is_dark_theme:
|
||||
pen.setColor(QColor(Qt.GlobalColor.black))
|
||||
else:
|
||||
pen.setColor(QColor(Qt.GlobalColor.white))
|
||||
if QApplication.instance().is_dark_theme:
|
||||
if hover:
|
||||
pen.setColor(QColor(Qt.GlobalColor.black))
|
||||
else:
|
||||
pen.setColor(QColor(Qt.GlobalColor.white))
|
||||
painter.setPen(pen)
|
||||
painter.drawText(rect, flags, text)
|
||||
painter.restore()
|
||||
|
Loading…
x
Reference in New Issue
Block a user