Clean up no longer needed code, and fix text justify setting

This commit is contained in:
Veronica Berglyd Olsen
2024-05-24 20:38:34 +02:00
parent e74c1057a4
commit a4e3bf848b
6 changed files with 52 additions and 125 deletions
+5 -13
View File
@@ -321,8 +321,11 @@ class GuiDocEditor(QPlainTextEdit):
# Reload spell check and dictionaries
SHARED.updateSpellCheckLanguage()
# Set font
self.initFont()
# Set the font. See issues #1862 and #1875.
self.setFont(CONFIG.textFont)
self.docHeader.updateFont()
self.docFooter.updateFont()
self.docSearch.updateFont()
# Update highlighter settings
self._qDocument.syntaxHighlighter.initHighlighter()
@@ -372,17 +375,6 @@ class GuiDocEditor(QPlainTextEdit):
return
def initFont(self) -> None:
"""Set the font of the main widget and sub-widgets. This needs
special attention since there appears to be a bug in Qt 5.15.3.
See issues #1862 and #1875.
"""
self.setFont(CONFIG.textFont)
self.docHeader.updateFont()
self.docFooter.updateFont()
self.docSearch.updateFont()
return
def loadText(self, tHandle: str, tLine: int | None = None) -> bool:
"""Load text from a document into the editor. If we have an I/O
error, we must handle this and clear the editor so that we don't