mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
(UI polish) Improved margins in Card Browser's "Previewer" (#4337)
* Improved margins in Card Browser's "Preview" pane * Alternate approach that looks good on Mac too --------- Co-authored-by: Damien Elmes <gpg@ankiweb.net> Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
This commit is contained in:
parent
c2957746f4
commit
ec6f09958a
1 changed files with 6 additions and 1 deletions
|
@ -13,7 +13,7 @@ import aqt.browser
|
|||
from anki.cards import Card
|
||||
from anki.collection import Config
|
||||
from anki.tags import MARKED_TAG
|
||||
from aqt import AnkiQt, gui_hooks
|
||||
from aqt import AnkiQt, gui_hooks, is_mac
|
||||
from aqt.qt import (
|
||||
QCheckBox,
|
||||
QDialog,
|
||||
|
@ -81,10 +81,15 @@ class Previewer(QDialog):
|
|||
qconnect(self.finished, self._on_finished)
|
||||
self.silentlyClose = True
|
||||
self.vbox = QVBoxLayout()
|
||||
spacing = 6
|
||||
self.vbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.vbox.setSpacing(spacing)
|
||||
self._web: AnkiWebView | None = AnkiWebView(kind=AnkiWebViewKind.PREVIEWER)
|
||||
self.vbox.addWidget(self._web)
|
||||
self.bbox = QDialogButtonBox()
|
||||
self.bbox.setContentsMargins(
|
||||
spacing, spacing if is_mac else 0, spacing, spacing
|
||||
)
|
||||
self.bbox.setLayoutDirection(Qt.LayoutDirection.LeftToRight)
|
||||
|
||||
gui_hooks.card_review_webview_did_init(self._web, AnkiWebViewKind.PREVIEWER)
|
||||
|
|
Loading…
Reference in a new issue