mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
1000+
This commit is contained in:
parent
c6c938a262
commit
9fc3647842
2 changed files with 6 additions and 1 deletions
|
@ -165,6 +165,8 @@ body { margin: 1em; -webkit-user-select: none; }
|
||||||
def nonzeroColour(cnt, colour):
|
def nonzeroColour(cnt, colour):
|
||||||
if not cnt:
|
if not cnt:
|
||||||
colour = "#e0e0e0"
|
colour = "#e0e0e0"
|
||||||
|
if cnt >= 1000:
|
||||||
|
cnt = "1000+"
|
||||||
return "<font color='%s'>%s</font>" % (colour, cnt)
|
return "<font color='%s'>%s</font>" % (colour, cnt)
|
||||||
buf += "<td align=right>%s</td><td align=right>%s</td>" % (
|
buf += "<td align=right>%s</td><td align=right>%s</td>" % (
|
||||||
nonzeroColour(due, "#007700"),
|
nonzeroColour(due, "#007700"),
|
||||||
|
|
|
@ -108,8 +108,11 @@ class Overview(object):
|
||||||
desc[:160], desc)
|
desc[:160], desc)
|
||||||
|
|
||||||
def _table(self):
|
def _table(self):
|
||||||
counts = self.mw.col.sched.counts()
|
counts = list(self.mw.col.sched.counts())
|
||||||
finished = not sum(counts)
|
finished = not sum(counts)
|
||||||
|
for n in range(len(counts)):
|
||||||
|
if counts[n] == 1000:
|
||||||
|
counts[n] = "1000+"
|
||||||
but = self.mw.button
|
but = self.mw.button
|
||||||
if finished:
|
if finished:
|
||||||
return '<div class=fin style="white-space: pre-wrap;">%s</div>' % (
|
return '<div class=fin style="white-space: pre-wrap;">%s</div>' % (
|
||||||
|
|
Loading…
Reference in a new issue