Colored button borders to prevent Hard misuse

This commit is contained in:
Expertium 2025-09-29 17:34:48 +03:00 committed by GitHub
parent a842ba1498
commit a74fd43d34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -919,6 +919,12 @@ timerStopped = false;
extra = """id="defease" """ extra = """id="defease" """
else: else:
extra = "" extra = ""
if i == 1:
button_class = "answerIncorrect"
else:
button_class = "answerCorrect"
due = self._buttonTime(i, v3_labels=labels) due = self._buttonTime(i, v3_labels=labels)
key = ( key = (
tr.actions_shortcut_key(val=aqt.mw.pm.get_answer_key(i)) tr.actions_shortcut_key(val=aqt.mw.pm.get_answer_key(i))
@ -926,9 +932,10 @@ timerStopped = false;
else "" else ""
) )
return """ return """
<td align=center><button %s title="%s" data-ease="%s" onclick='pycmd("ease%d");'>\ <td align=center><button %s class="answerButton %s" title="%s" data-ease="%s" onclick='pycmd("ease%d");'>\
%s%s</button></td>""" % ( %s%s</button></td>""" % (
extra, extra,
button_class,
key, key,
i, i,
i, i,