From f8d79a6e3748f19764c9de273c84d72a7686dd6c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 3 Dec 2008 22:32:31 +0900 Subject: [PATCH] reduce button size, fix bug with answer active, don't center fin msg --- ankiqt/ui/main.py | 4 +++- ankiqt/ui/view.py | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 073586910..d6c419a7a 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -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 diff --git a/ankiqt/ui/view.py b/ankiqt/ui/view.py index 35c651ce4..1082913f7 100644 --- a/ankiqt/ui/view.py +++ b/ankiqt/ui/view.py @@ -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. def drawDeckFinishedMessage(self): "Tell the user the deck is finished." - self.write("
" + - self.main.deck.deckFinishedMsg() + - "
") + self.write(self.main.deck.deckFinishedMsg()) class AnkiWebView(QWebView):