mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add shortcut to new preview button
This commit is contained in:
parent
fe118197a3
commit
59d0e8f036
1 changed files with 3 additions and 1 deletions
|
@ -867,13 +867,15 @@ QTableView {{ gridline-color: {grid} }}
|
|||
|
||||
def setupEditor(self):
|
||||
def add_preview_button(leftbuttons, editor):
|
||||
preview_shortcut = "Ctrl+Shift+P"
|
||||
leftbuttons.insert(0, editor.addButton(
|
||||
None,
|
||||
"preview",
|
||||
lambda _editor: self.onTogglePreview(),
|
||||
tr(TR.BROWSING_PREVIEW_SELECTED_CARD, val=shortcut("Ctrl+Shift+P")),
|
||||
tr(TR.BROWSING_PREVIEW_SELECTED_CARD, val=preview_shortcut),
|
||||
tr(TR.ACTIONS_PREVIEW),
|
||||
id="previewButton",
|
||||
keys=preview_shortcut,
|
||||
disables=False,
|
||||
rightside=False,
|
||||
toggleable=True,
|
||||
|
|
Loading…
Reference in a new issue