Switch to the system default monospaced font for the config editor area

This commit is contained in:
Glutanimate 2019-02-15 14:15:54 +01:00
parent 6c982ac05b
commit 11f3d77eb1

View File

@ -474,6 +474,7 @@ class ConfigEditor(QDialog):
self.form.setupUi(self) self.form.setupUi(self)
restore = self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults) restore = self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults)
restore.clicked.connect(self.onRestoreDefaults) restore.clicked.connect(self.onRestoreDefaults)
self.setupFonts()
self.updateHelp() self.updateHelp()
self.updateText(self.conf) self.updateText(self.conf)
self.show() self.show()
@ -482,6 +483,10 @@ class ConfigEditor(QDialog):
default_conf = self.mgr.addonConfigDefaults(self.addon) default_conf = self.mgr.addonConfigDefaults(self.addon)
self.updateText(default_conf) self.updateText(default_conf)
def setupFonts(self):
font_mono = QFontDatabase.systemFont(QFontDatabase.FixedFont)
self.form.editor.setFont(font_mono)
def updateHelp(self): def updateHelp(self):
txt = self.mgr.addonConfigHelp(self.addon) txt = self.mgr.addonConfigHelp(self.addon)
if txt: if txt: