mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Save and restore the debug console window geometry and splitter
This commit is contained in:
parent
cfc2a549f1
commit
9257e75762
1 changed files with 14 additions and 2 deletions
|
@ -53,7 +53,10 @@ from aqt.utils import (
|
||||||
openHelp,
|
openHelp,
|
||||||
openLink,
|
openLink,
|
||||||
restoreGeom,
|
restoreGeom,
|
||||||
|
restoreSplitter,
|
||||||
restoreState,
|
restoreState,
|
||||||
|
saveGeom,
|
||||||
|
saveSplitter,
|
||||||
showInfo,
|
showInfo,
|
||||||
showText,
|
showText,
|
||||||
showWarning,
|
showWarning,
|
||||||
|
@ -1365,10 +1368,19 @@ will be lost. Continue?"""
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
def onDebug(self):
|
def onDebug(self):
|
||||||
d = self.debugDiag = QDialog()
|
|
||||||
d.silentlyClose = True
|
|
||||||
frm = self.debug_diag_form = aqt.forms.debug.Ui_Dialog()
|
frm = self.debug_diag_form = aqt.forms.debug.Ui_Dialog()
|
||||||
|
|
||||||
|
class DebugDialog(QDialog):
|
||||||
|
def reject(self):
|
||||||
|
super().reject()
|
||||||
|
saveSplitter(frm.splitter, "DebugConsoleWindow")
|
||||||
|
saveGeom(self, "DebugConsoleWindow")
|
||||||
|
|
||||||
|
d = self.debugDiag = DebugDialog()
|
||||||
|
d.silentlyClose = True
|
||||||
frm.setupUi(d)
|
frm.setupUi(d)
|
||||||
|
restoreGeom(d, "DebugConsoleWindow")
|
||||||
|
restoreSplitter(frm.splitter, "DebugConsoleWindow")
|
||||||
font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
|
font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
|
||||||
font.setPointSize(frm.text.font().pointSize() + 1)
|
font.setPointSize(frm.text.font().pointSize() + 1)
|
||||||
frm.text.setFont(font)
|
frm.text.setFont(font)
|
||||||
|
|
Loading…
Reference in a new issue