mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -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,
|
||||
openLink,
|
||||
restoreGeom,
|
||||
restoreSplitter,
|
||||
restoreState,
|
||||
saveGeom,
|
||||
saveSplitter,
|
||||
showInfo,
|
||||
showText,
|
||||
showWarning,
|
||||
|
@ -1365,10 +1368,19 @@ will be lost. Continue?"""
|
|||
######################################################################
|
||||
|
||||
def onDebug(self):
|
||||
d = self.debugDiag = QDialog()
|
||||
d.silentlyClose = True
|
||||
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)
|
||||
restoreGeom(d, "DebugConsoleWindow")
|
||||
restoreSplitter(frm.splitter, "DebugConsoleWindow")
|
||||
font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
|
||||
font.setPointSize(frm.text.font().pointSize() + 1)
|
||||
frm.text.setFont(font)
|
||||
|
|
Loading…
Reference in a new issue