diff --git a/ankiqt/config.py b/ankiqt/config.py index 580ee465c..8466ad459 100644 --- a/ankiqt/config.py +++ b/ankiqt/config.py @@ -83,6 +83,7 @@ class Config(dict): 'editFontFamily': 'Arial', 'editFontSize': 12, 'factEditorAdvanced': False, + 'typeAnswerFontSize': 20, } for (k,v) in fields.items(): if not self.has_key(k): diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 41f514eb9..781eef865 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -279,6 +279,7 @@ Please do not file a bug report with Anki.

""") self.showEditor() elif state == "saveEdit": self.editor.saveFieldsNow() + self.mainWin.buttonStack.show() self.deck.s.flush() return self.moveToState("auto") elif state == "studyScreen": @@ -440,16 +441,18 @@ new: # ask self.connect(self.mainWin.showAnswerButton, SIGNAL("clicked()"), lambda: self.moveToState("showAnswer")) + self.mainWin.showAnswerButton.setFixedWidth(351) + self.mainWin.showAnswerButton.setFixedHeight(41) # answer for i in range(1, 5): b = getattr(self.mainWin, "easeButton%d" % i) b.setFixedWidth(85) self.connect(b, SIGNAL("clicked()"), lambda i=i: self.cardAnswered(i)) - # editor - self.connect(self.mainWin.saveEditorButton, SIGNAL("clicked()"), - lambda: self.moveToState("saveEdit")) # type answer + outer = QHBoxLayout() + self.typeAnswerSpacer1 = QSpacerItem(5, 5) + outer.addSpacerItem(self.typeAnswerSpacer1) class QLineEditNoUndo(QLineEdit): def __init__(self, parent): self.parent = parent @@ -462,14 +465,21 @@ new: else: return QLineEdit.keyPressEvent(self, evt) self.typeAnswerField = QLineEditNoUndo(self) - self.mainWin.typeAnswerLayout.addWidget(self.typeAnswerField) + self.typeAnswerField.setFixedWidth(351) + f = QFont() + f.setPixelSize(self.config['typeAnswerFontSize']) + self.typeAnswerField.setFont(f) + outer.addWidget(self.typeAnswerField) + self.typeAnswerSpacer2 = QSpacerItem(5, 5) + outer.addSpacerItem(self.typeAnswerSpacer2) + self.mainWin.typeAnswerPage.setLayout(outer) def hideButtons(self): self.mainWin.buttonStack.hide() def showAnswerButton(self): if self.currentCard.cardModel.typeAnswer: - self.mainWin.buttonStack.setCurrentIndex(4) + self.mainWin.buttonStack.setCurrentIndex(2) self.typeAnswerField.setFocus() if not unicode(self.typeAnswerField.text()): self.typeAnswerField.setText(_( @@ -491,10 +501,6 @@ new: else: self.mainWin.easeButton3.setFocus() - def showSaveEditorButton(self): - self.mainWin.buttonStack.setCurrentIndex(2) - self.mainWin.buttonStack.show() - def updateEaseButtons(self): nextInts = {} for i in range(1, 5): @@ -946,9 +952,13 @@ To upgrade an old deck, download Anki 0.9.8.7.""")) self, self.mainWin.fieldsArea, self.deck) self.editor.onFactValid = self.onFactValid self.editor.onFactInvalid = self.onFactInvalid + # editor + self.connect(self.mainWin.saveEditorButton, SIGNAL("clicked()"), + lambda: self.moveToState("saveEdit")) + def showEditor(self): - self.showSaveEditorButton() + self.mainWin.buttonStack.hide() self.switchToEditScreen() self.editor.setFact(self.currentCard.fact) @@ -1070,8 +1080,7 @@ day = :d""", d=yesterday) self.switchToStudyScreen() self.updateStudyStats() # start reviewing button - self.mainWin.buttonStack.setCurrentIndex(3) - self.mainWin.buttonStack.show() + self.mainWin.buttonStack.hide() t = " " * 5 if initial: self.mainWin.startReviewingButton.setText(t+_("Start &Reviewing")) diff --git a/ankiqt/ui/status.py b/ankiqt/ui/status.py index 312d8cd50..0f76910c5 100644 --- a/ankiqt/ui/status.py +++ b/ankiqt/ui/status.py @@ -106,6 +106,8 @@ class StatusView(object): self.timer.setText("00:00") if sys.platform.startswith("darwin"): self.timer.setFixedWidth(40) + else: + self.timer.setFixedWidth(33) self.addWidget(self.timer) self.plastiqueStyle = QStyleFactory.create("plastique") self.progressBar.setStyle(self.plastiqueStyle) diff --git a/designer/main.ui b/designer/main.ui index 15d40dec5..529136410 100644 --- a/designer/main.ui +++ b/designer/main.ui @@ -5,8 +5,8 @@ 0 0 - 699 - 446 + 988 + 710 @@ -27,8 +27,8 @@ 0 69 - 699 - 357 + 988 + 621 @@ -138,7 +138,7 @@ - 5 + 3 @@ -146,34 +146,76 @@ 0 0 422 - 59 + 57 - + + 0 + + + 8 + + + 4 + + + 8 + + 4 - - - - 0 - 0 - - - - - 0 - 41 - - - - Show the answer (shortcut key: space or enter) - - - Show Answer - - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 0 + 41 + + + + Show the answer (shortcut key: space or enter) + + + Show Answer + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + @@ -183,7 +225,7 @@ 0 0 422 - 53 + 57 @@ -215,24 +257,17 @@ - + + + 4 + + + 4 + 0 - - - - Qt::Vertical - - - - 55 - 13 - - - - - + @@ -242,7 +277,7 @@ - + @@ -252,7 +287,7 @@ - + @@ -262,7 +297,7 @@ - + @@ -272,7 +307,7 @@ - + Show this card again soon (shortcut key: 1) @@ -282,7 +317,7 @@ - + Wait a little longer next time (shortcut key: 2) @@ -292,7 +327,7 @@ - + Wait longer next time (shortcut key: 3) @@ -302,7 +337,7 @@ - + Wait a lot longer next time (shortcut key: 4) @@ -331,118 +366,23 @@ - + 0 0 422 - 53 + 57 - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - Close - - - Esc - - - - - + 0 0 - 422 - 53 - - - - - - - Qt::Vertical - - - - 20 - 13 - - - - - - - - Review - - - - :/icons/player-time.png:/icons/player-time.png - - - - 32 - 32 - - - - - - - - - - 0 - 0 - 422 - 53 - - - - - - - Qt::Vertical - - - QSizePolicy::Minimum - - - - 20 - 2 - - - - - - - - - - 0 - 0 - 422 - 53 + 711 + 57 @@ -457,7 +397,7 @@ - 0 + 4 @@ -465,7 +405,7 @@ 0 0 422 - 304 + 300 @@ -474,8 +414,8 @@ 0 0 - 422 - 304 + 711 + 564 @@ -500,7 +440,7 @@ 0 0 422 - 304 + 300 @@ -513,6 +453,23 @@ + + + + Continue Reviewing + + + + :/icons/go-previous.png:/icons/go-previous.png + + + + 16 + 16 + + + + @@ -520,400 +477,361 @@ 0 0 - 422 - 304 + 711 + 564 - - - 0 - - - - - 0 + + + + + Qt::Vertical - - 4 + + + 20 + 38 + + + + + - - - - 400 - 0 - - - - xxx - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - + - Qt::Vertical - - - QSizePolicy::Fixed + Qt::Horizontal - 20 - 6 + 40 + 20 - + - 400 + 450 16777215 - - Qt::Horizontal + + QFrame::StyledPanel - - - - - - 2 + + QFrame::Raised - - 6 - - - 0 - - - - - - 140 - 0 - - - - <b>Session limit (mins):</b> - - - 4 - - - - - - - - 0 - 0 - - - - - 50 - 16777215 - - - - - - - - - 140 - 0 - - - - <b>New cards per day:</b> - - - 4 - - - - - - - - 0 - 0 - - - - - 50 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 50 - 16777215 - - - - - - - - <b>Session limit (reps): - - - 4 - - - - - - - 6 - - - 4 - - - - - More>> - - - true - - - false - - - false - - - - - - - Help - - - - - - - - - - - - + + + - 4 - - - 2 + 0 4 - - 0 - - - 0 - - + - 250 + 400 0 - - - - - - - 400 - 16777215 - - - - - - - - - 400 - 16777215 - - - - - - - Show failed cards last + xxx + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 6 + + + + + + + + + 400 + 16777215 + + + + Qt::Horizontal + + + + + + + 2 + + + 6 + + + 0 + + + 4 + + + + + + 140 + 0 + + + + <b>Session limit (mins):</b> + + + 4 + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + + + + + + 140 + 0 + + + + <b>New cards per day:</b> + + + 4 + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + + + + + <b>Session limit (reps): + + + 4 + + + + + + + 6 + + + 4 + + + + + More>> + + + true + + + false + + + false + + + + + + + Help + + + + + + + + + + + + + + 4 + + + 2 + + + 4 + + + 0 + + + 0 + + + + + + 250 + 0 + + + + + + + + + 400 + 16777215 + + + + + + + + + 400 + 16777215 + + + + + + + + Show failed cards last + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + Review + + + + :/icons/player-time.png:/icons/player-time.png + + + + 32 + 32 + + + + + + - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 1000 - 20 - - - - - - - - - - 0 - 0 - 422 - 304 - - - - - - - - - 6 - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - xxx - - - 0 - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - &Learn More - - - - 32 - 32 - - - - - - - - Re&view Early - - - - 32 - 32 - - - - - + + + - + Qt::Horizontal @@ -928,14 +846,169 @@ - + Qt::Vertical 20 - 40 + 39 + + + + + + + + + + 0 + 0 + 711 + 564 + + + + + + + Qt::Vertical + + + + 20 + 219 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + 10 + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + xxx + + + 0 + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + &Learn More + + + + 32 + 32 + + + + + + + + Re&view Early + + + + 32 + 32 + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 219 @@ -1135,7 +1208,7 @@ 0 0 - 699 + 988 23 @@ -1281,11 +1354,14 @@ 0 - 426 - 699 + 690 + 988 20 + + true + @@ -1295,7 +1371,7 @@ 0 23 - 699 + 988 46 @@ -1871,23 +1947,11 @@ - newPerDay - minuteLimit - questionLimit - optionsButton - optionsHelpButton - newCardOrder - newCardScheduling - revCardOrder - delayLapsedCards easeButton1 easeButton2 easeButton3 easeButton4 - startReviewingButton - showAnswerButton help - saveEditorButton welcomeText @@ -1901,12 +1965,12 @@ setShown(bool) - 54 - 202 + 203 + 322 - 53 - 250 + 194 + 364