mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
alternate colours when suspended
This commit is contained in:
parent
5fc9389e13
commit
93eb5b5a93
1 changed files with 4 additions and 1 deletions
|
@ -269,7 +269,10 @@ class StatusDelegate(QItemDelegate):
|
||||||
row = self.model.cards[index.row()]
|
row = self.model.cards[index.row()]
|
||||||
if row[CARD_PRIORITY] == 0:
|
if row[CARD_PRIORITY] == 0:
|
||||||
# custom render
|
# custom render
|
||||||
brush = QBrush(QColor("#ffffaa"))
|
if index.row() % 2 == 0:
|
||||||
|
brush = QBrush(QColor("#ffffcc"))
|
||||||
|
else:
|
||||||
|
brush = QBrush(QColor("#ffffaa"))
|
||||||
painter.save()
|
painter.save()
|
||||||
painter.fillRect(option.rect, brush)
|
painter.fillRect(option.rect, brush)
|
||||||
painter.restore()
|
painter.restore()
|
||||||
|
|
Loading…
Reference in a new issue