Move all code to set default text font into the Config class

This commit is contained in:
Veronica Berglyd Olsen
2023-05-31 17:49:31 +02:00
parent 74f46f4633
commit 704fffada3
13 changed files with 62 additions and 63 deletions
+4 -7
View File
@@ -114,13 +114,10 @@ class GuiDocViewer(QTextBrowser):
self._makeStyleSheet()
# Set Font
theFont = QFont()
if CONFIG.textFont is None:
# If none is defined, set the default back to config
CONFIG.textFont = self.document().defaultFont().family()
theFont.setFamily(CONFIG.textFont)
theFont.setPointSize(CONFIG.textSize)
self.setFont(theFont)
textFont = QFont()
textFont.setFamily(CONFIG.textFont)
textFont.setPointSize(CONFIG.textSize)
self.setFont(textFont)
# Set the widget colours to match syntax theme
mainPalette = self.palette()