mirror of
https://github.com/ankitects/anki.git
synced 2025-11-13 16:17:13 -05:00
mark inacitve and suspended in different colours
This commit is contained in:
parent
184afcf4b5
commit
6256e5bd36
1 changed files with 10 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ class StatusDelegate(QItemDelegate):
|
|||
if len(self.model.cards[index.row()]) == 1:
|
||||
self.model.updateCard(index)
|
||||
row = self.model.cards[index.row()]
|
||||
if row[CARD_PRIORITY] in (-3, 0):
|
||||
if row[CARD_PRIORITY] == -3:
|
||||
# custom render
|
||||
if index.row() % 2 == 0:
|
||||
brush = QBrush(QColor("#ffffcc"))
|
||||
|
|
@ -288,6 +288,15 @@ class StatusDelegate(QItemDelegate):
|
|||
painter.save()
|
||||
painter.fillRect(option.rect, brush)
|
||||
painter.restore()
|
||||
if row[CARD_PRIORITY] == 0:
|
||||
# custom render
|
||||
if index.row() % 2 == 0:
|
||||
brush = QBrush(QColor("#ffcccc"))
|
||||
else:
|
||||
brush = QBrush(QColor("#ffaaaa"))
|
||||
painter.save()
|
||||
painter.fillRect(option.rect, brush)
|
||||
painter.restore()
|
||||
elif "Marked" in row[CARD_TAGS]:
|
||||
if index.row() % 2 == 0:
|
||||
brush = QBrush(QColor("#ccccff"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue