use the field model's font/colours for type answer support

This commit is contained in:
Damien Elmes 2010-12-25 07:04:54 +09:00
parent 781324741a
commit d0fa8ce9a6

View file

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