Skip to content

Commit 07ee204

Browse files
EchterAgoSomberNight
authored andcommitted
Qt Console: Fix font reset when moving between screens
When the console was moved between screen boundaries with different scaling settings, the font was reset. This is because QPlainTextEdit sets the documents default font back to its own font property when Qt has a font change event. This patch sets the font property of the editor instead of the document. this ports Electron-Cash@60d63b3 related: Electron-Cash#1314
1 parent b5d2b3c commit 07ee204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

electrum/gui/qt/console.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, parent=None):
5858
self.setGeometry(50, 75, 600, 400)
5959
self.setWordWrapMode(QtGui.QTextOption.WrapAnywhere)
6060
self.setUndoRedoEnabled(False)
61-
self.document().setDefaultFont(QtGui.QFont(MONOSPACE_FONT, 10, QtGui.QFont.Normal))
61+
self.setFont(QtGui.QFont(MONOSPACE_FONT, 10, QtGui.QFont.Normal))
6262
self.newPrompt("") # make sure there is always a prompt, even before first server.banner
6363

6464
self.updateNamespace({'run':self.run_script})

0 commit comments

Comments
 (0)