reduce button size, fix bug with answer active, don't center fin msg

This commit is contained in:
Damien Elmes 2008-12-03 22:32:31 +09:00
parent d9842e5a30
commit f8d79a6e37
2 changed files with 5 additions and 4 deletions

View file

@ -256,6 +256,8 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
def cardAnswered(self, quality):
"Reschedule current card and move back to getQuestion state."
if self.state != "showAnswer":
return
# copy card for undo
self.lastCardBackup = copy.copy(self.currentCard)
# remove card from session before updating it
@ -337,7 +339,7 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
for i in range(1, 5):
b = getattr(self.mainWin, "easeButton%d" % i)
b.setFixedHeight(self.easeButtonHeight)
b.setFixedWidth(100)
b.setFixedWidth(85)
self.connect(b, SIGNAL("clicked()"),
lambda i=i: self.cardAnswered(i))
# editor

View file

@ -52,6 +52,7 @@ class View(object):
self.main.config['showLastCardContent'] or
self.main.config['showLastCardInterval']))
self.drawRule = (self.main.config['qaDivider'] and
self.main.currentCard and
not self.main.currentCard.cardModel.questionInAnswer)
if not self.main.deck.isEmpty():
if self.haveTop:
@ -240,9 +241,7 @@ Start adding your own material.</td>
def drawDeckFinishedMessage(self):
"Tell the user the deck is finished."
self.write("<br><center><table width=250><tr><td align='left'>" +
self.main.deck.deckFinishedMsg() +
"</td></tr></table></center>")
self.write(self.main.deck.deckFinishedMsg())
class AnkiWebView(QWebView):