mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't alternate colours on marked/suspended; make colours more subtle
This commit is contained in:
parent
2f47dba5e4
commit
33066d538c
1 changed files with 4 additions and 14 deletions
|
@ -17,12 +17,8 @@ from anki.hooks import runHook, addHook, remHook
|
||||||
from aqt.webview import AnkiWebView
|
from aqt.webview import AnkiWebView
|
||||||
from aqt.toolbar import Toolbar
|
from aqt.toolbar import Toolbar
|
||||||
|
|
||||||
COLOUR_SUSPENDED1 = "#ffffcc"
|
COLOUR_SUSPENDED = "#fffff0"
|
||||||
COLOUR_SUSPENDED2 = "#ffffaa"
|
COLOUR_MARKED = "#eeeeff"
|
||||||
COLOUR_INACTIVE1 = "#ffcccc"
|
|
||||||
COLOUR_INACTIVE2 = "#ffaaaa"
|
|
||||||
COLOUR_MARKED1 = "#ccccff"
|
|
||||||
COLOUR_MARKED2 = "#aaaaff"
|
|
||||||
|
|
||||||
# fixme: need to refresh after undo
|
# fixme: need to refresh after undo
|
||||||
|
|
||||||
|
@ -279,18 +275,12 @@ class StatusDelegate(QItemDelegate):
|
||||||
return
|
return
|
||||||
if c.queue < 0:
|
if c.queue < 0:
|
||||||
# custom render
|
# custom render
|
||||||
if index.row() % 2 == 0:
|
brush = QBrush(QColor(COLOUR_SUSPENDED))
|
||||||
brush = QBrush(QColor(COLOUR_SUSPENDED1))
|
|
||||||
else:
|
|
||||||
brush = QBrush(QColor(COLOUR_SUSPENDED2))
|
|
||||||
painter.save()
|
painter.save()
|
||||||
painter.fillRect(option.rect, brush)
|
painter.fillRect(option.rect, brush)
|
||||||
painter.restore()
|
painter.restore()
|
||||||
elif c.note().hasTag("Marked"):
|
elif c.note().hasTag("Marked"):
|
||||||
if index.row() % 2 == 0:
|
brush = QBrush(QColor(COLOUR_MARKED))
|
||||||
brush = QBrush(QColor(COLOUR_MARKED1))
|
|
||||||
else:
|
|
||||||
brush = QBrush(QColor(COLOUR_MARKED2))
|
|
||||||
painter.save()
|
painter.save()
|
||||||
painter.fillRect(option.rect, brush)
|
painter.fillRect(option.rect, brush)
|
||||||
painter.restore()
|
painter.restore()
|
||||||
|
|
Loading…
Reference in a new issue