Advertisement
ShutUpDonny

Button Colours (RU)

Apr 22nd, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.84 KB | None | 0 0
  1. # coding: utf-8
  2. # Author: Calumks <calumks@gmail.com>
  3. # Get reviewer class
  4. from __future__ import unicode_literals
  5. from aqt.reviewer import Reviewer
  6.  
  7. # Replace _answerButtonList method
  8. def answerButtonList(self):
  9.     l = ((1, "<b style=color:red'>" + _("Снова") + "</b>"),)
  10.     cnt = self.mw.col.sched.answerButtons(self.card)
  11.     if cnt == 2:
  12.         return l + ((2, "<b style=color:green'>" + _("Хорошо") + "</b>"),)
  13.     elif cnt == 3:
  14.         return l + ((2, "<b style=color:green'>" + _("Хорошо") + "</b>"), (3, "<b style=color:blue'>" + _("Легко")  + "</b>"))
  15.     else:
  16.         return l + ((2, "<b style=color:default'>" + _("Сложно")  + "</b>"), (3, "<b style=color:green'>" + _("Хорошо") + "</b>"), (4, "<b style=color:blue'>" + _("Легко")  + "</b>"))
  17.  
  18. Reviewer._answerButtonList = answerButtonList
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement