mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix RTL arrangement of browser views (#2176)
This commit is contained in:
parent
20d2a0f33b
commit
e64784f093
1 changed files with 9 additions and 4 deletions
|
@ -140,9 +140,14 @@ class Browser(QMainWindow):
|
||||||
|
|
||||||
# restoreXXX() should be called after all child widgets have been created
|
# restoreXXX() should be called after all child widgets have been created
|
||||||
# and attached to QMainWindow
|
# and attached to QMainWindow
|
||||||
restoreGeom(self, "editor", 0)
|
self._editor_state_key = (
|
||||||
|
"editorRTL"
|
||||||
|
if self.layoutDirection() == Qt.LayoutDirection.RightToLeft
|
||||||
|
else "editor"
|
||||||
|
)
|
||||||
|
restoreGeom(self, self._editor_state_key, 0)
|
||||||
restoreSplitter(self.form.splitter, "editor3")
|
restoreSplitter(self.form.splitter, "editor3")
|
||||||
restoreState(self, "editor")
|
restoreState(self, self._editor_state_key)
|
||||||
|
|
||||||
# responsive layout
|
# responsive layout
|
||||||
self.aspect_ratio = self.width() / self.height()
|
self.aspect_ratio = self.width() / self.height()
|
||||||
|
@ -348,8 +353,8 @@ class Browser(QMainWindow):
|
||||||
self.table.cleanup()
|
self.table.cleanup()
|
||||||
self.sidebar.cleanup()
|
self.sidebar.cleanup()
|
||||||
saveSplitter(self.form.splitter, "editor3")
|
saveSplitter(self.form.splitter, "editor3")
|
||||||
saveGeom(self, "editor")
|
saveGeom(self, self._editor_state_key)
|
||||||
saveState(self, "editor")
|
saveState(self, self._editor_state_key)
|
||||||
self.teardownHooks()
|
self.teardownHooks()
|
||||||
self.mw.maybeReset()
|
self.mw.maybeReset()
|
||||||
aqt.dialogs.markClosed("Browser")
|
aqt.dialogs.markClosed("Browser")
|
||||||
|
|
Loading…
Reference in a new issue