diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 2047ef215..cfcd0451e 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -242,7 +242,7 @@ class FactEditor(object): self.addSound.setShortcut(_("F4")) self.addSound.setEnabled(False) self.addSound.setIcon(QIcon(":/icons/text-speak.png")) - self.addSound.setToolTip(_("Add audio (F4)")) + self.addSound.setToolTip(_("Add audio/video (F4)")) self.iconsBox.addWidget(self.addSound) self.addSound.setStyle(self.plastiqueStyle) # sounds @@ -870,7 +870,7 @@ class FactEditor(object): def onAddSound(self): # get this before we open the dialog w = self.focusedEdit() - key = _("Sounds (*.mp3 *.ogg *.wav)") + key = _("Sounds/Videos (*.mp3 *.ogg *.wav *.avi *.ogv *.mpg *.mpeg)") file = ui.utils.getFile(self.parent, _("Add audio"), "audio", key) if not file: return @@ -1051,7 +1051,7 @@ class PreviewDialog(QDialog): styles = (self.deck.css + ("\nhtml { background: %s }" % c.cardModel.lastFontColour) + "\ndiv { white-space: pre-wrap; }") - styles = runFilter("addStyles", styles) + styles = runFilter("addStyles", styles, c) self.dialog.webView.setHtml( ('
%s' % getBase(self.deck)) + "" + diff --git a/ankiqt/ui/view.py b/ankiqt/ui/view.py index af2d20624..e9adbaec0 100644 --- a/ankiqt/ui/view.py +++ b/ankiqt/ui/view.py @@ -87,7 +87,7 @@ class View(object): if self.main.deck: s += self.main.deck.css s += "div { white-space: pre-wrap; }\n" - s = runFilter("addStyles", s) + s = runFilter("addStyles", s, self.main.currentCard) s += "" return s @@ -135,6 +135,8 @@ class View(object): q = self.main.currentCard.htmlQuestion() if self.haveTop: height = 35 + elif self.main.currentCard.cardModel.questionInAnswer: + height = 40 else: height = 45 q = runFilter("drawQuestion", q, self.main.currentCard)