use 'Preview Settings' as a label for the new options button

This commit is contained in:
ANH 2020-07-30 18:04:50 +03:00
parent 03a80e596a
commit 43620b0a30
3 changed files with 12 additions and 6 deletions

View file

@ -290,8 +290,10 @@ class CardLayout(QDialog):
pform.preview_front.isChecked()
qconnect(pform.preview_front.clicked, self.on_preview_toggled)
qconnect(pform.preview_back.clicked, self.on_preview_toggled)
pform.preview_options.setText(_("Options") + " " + downArrow())
qconnect(pform.preview_options.clicked, self.on_preview_options)
pform.preview_settings.setText(
tr(TR.CARD_TEMPLATES_PREVIEW_SETTINGS) + " " + downArrow()
)
qconnect(pform.preview_settings.clicked, self.on_preview_settings)
jsinc = [
"jquery.js",
@ -328,7 +330,7 @@ class CardLayout(QDialog):
self.mobile_class_action_toggled = not self.mobile_class_action_toggled
self.on_preview_toggled()
def on_preview_options(self):
def on_preview_settings(self):
m = QMenu(self)
a = m.addAction(tr(TR.CARD_TEMPLATES_FILL_EMPTY))
@ -348,7 +350,7 @@ class CardLayout(QDialog):
a.setChecked(self.mobile_class_action_toggled)
qconnect(a.toggled, self.on_mobile_class_action_toggled)
m.exec_(self.pform.preview_options.mapToGlobal(QPoint(0, 0)))
m.exec_(self.pform.preview_settings.mapToGlobal(QPoint(0, 0)))
def on_preview_toggled(self):
self.have_autoplayed = False

View file

@ -65,7 +65,11 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="preview_options">
<widget class="QPushButton" name="preview_settings">
<property name="styleSheet">
<string notr="true">padding: 3px;
padding-left: 5px;</string>
</property>
<property name="text">
<string/>
</property>

View file

@ -16,4 +16,4 @@ card-templates-fill-empty = Fill Empty Fields
card-templates-invalid-template-number = Please correct the problems on card template { $number } first.
card-templates-invert-night-mode = Invert Night Mode
card-templates-add-mobile-class = Add mobile Class
card-templates-preview-settings = Preview Settings