From 93eb5b5a9390ecd6481499db5108b3d38f3b741c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 10 Jun 2009 12:39:31 +0900 Subject: [PATCH] alternate colours when suspended --- ankiqt/ui/cardlist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/cardlist.py b/ankiqt/ui/cardlist.py index 42e58322a..77ef9562b 100644 --- a/ankiqt/ui/cardlist.py +++ b/ankiqt/ui/cardlist.py @@ -269,7 +269,10 @@ class StatusDelegate(QItemDelegate): row = self.model.cards[index.row()] if row[CARD_PRIORITY] == 0: # custom render - brush = QBrush(QColor("#ffffaa")) + if index.row() % 2 == 0: + brush = QBrush(QColor("#ffffcc")) + else: + brush = QBrush(QColor("#ffffaa")) painter.save() painter.fillRect(option.rect, brush) painter.restore()