mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 13:47:13 -05:00
use the field model's font/colours for type answer support
This commit is contained in:
parent
781324741a
commit
d0fa8ce9a6
1 changed files with 7 additions and 2 deletions
|
|
@ -148,8 +148,13 @@ class View(object):
|
||||||
ret = "";
|
ret = "";
|
||||||
s = difflib.SequenceMatcher(None, b, a)
|
s = difflib.SequenceMatcher(None, b, a)
|
||||||
|
|
||||||
sz = self.main.currentCard.cardModel.answerFontSize
|
sz = 20
|
||||||
fn = self.main.currentCard.cardModel.answerFontFamily
|
fn = u"Arial"
|
||||||
|
for fm in self.main.currentCard.fact.model.fieldModels:
|
||||||
|
if fm.name == self.main.currentCard.cardModel.typeAnswer:
|
||||||
|
sz = fm.quizFontSize
|
||||||
|
fn = fm.quizFontFamily
|
||||||
|
break
|
||||||
st = "background: %s; color: #000; font-size: %dpx; font-family: %s;"
|
st = "background: %s; color: #000; font-size: %dpx; font-family: %s;"
|
||||||
ok = st % (passedCharColour, sz, fn)
|
ok = st % (passedCharColour, sz, fn)
|
||||||
bad = st % (failedCharColour, sz, fn)
|
bad = st % (failedCharColour, sz, fn)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue