mark inacitve and suspended in different colours

This commit is contained in:
Damien Elmes 2009-07-08 13:48:23 +09:00
parent 184afcf4b5
commit 6256e5bd36

View file

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