Fixed setting of font for doceditor and docviewer

This commit is contained in:
Veronica K. B. Olsen
2019-06-12 20:55:41 +02:00
parent 46bd7a8871
commit 8e73d6ac9a
6 changed files with 31 additions and 232 deletions
+6 -6
View File
@@ -126,13 +126,13 @@ class GuiDocEditor(QTextEdit):
self.setDictionaries()
# Set Font
if self.mainConf.textFont is not None:
self.setFontFamily(self.mainConf.textFont)
else:
theFont = QFont()
if self.mainConf.textFont is None:
# If none is defined, set the default back to config
theFont = self.theQDoc.defaultFont().family()
self.mainConf.textFont = theFont
self.setFontPointSize(self.mainConf.textSize)
self.mainConf.textFont = self.theQDoc.defaultFont().family()
theFont.setFamily(self.mainConf.textFont)
theFont.setPointSize(self.mainConf.textSize)
self.setFont(theFont)
# Set text fixed width, or alternatively, just margins
if self.mainConf.textFixedW: