mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
Add a margin on macOS even when not collapsed
This commit is contained in:
parent
1e143e99fe
commit
18a3dbc75c
1 changed files with 5 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ from aqt.operations.tag import (
|
|||
from aqt.qt import *
|
||||
from aqt.sound import av_player
|
||||
from aqt.switch import Switch
|
||||
from aqt.theme import WidgetStyle
|
||||
from aqt.undo import UndoActionsInfo
|
||||
from aqt.utils import (
|
||||
HelpPage,
|
||||
|
|
@ -751,7 +752,10 @@ class Browser(QMainWindow):
|
|||
|
||||
def onSidebarVisibilityChange(self, visible):
|
||||
margins = self.form.verticalLayout_3.contentsMargins()
|
||||
margins.setLeft(0 if visible else margins.right())
|
||||
skip_left_margin = not visible and not (
|
||||
is_mac and aqt.mw.pm.get_widget_style() == WidgetStyle.NATIVE
|
||||
)
|
||||
margins.setLeft(0 if skip_left_margin else margins.right())
|
||||
self.form.verticalLayout_3.setContentsMargins(margins)
|
||||
|
||||
if visible:
|
||||
|
|
|
|||
Loading…
Reference in a new issue