Added a number of options to the config gui

This commit is contained in:
Veronica K. B. Olsen
2019-06-10 21:55:17 +02:00
parent ca0a756fe5
commit 30f25fcb2b
5 changed files with 147 additions and 12 deletions
+11 -3
View File
@@ -32,7 +32,9 @@ class GuiDocHighlighter(QSyntaxHighlighter):
self.theDict = None
self.theHandle = None
self.spellCheck = False
self.spellRx = None
self.hRules = []
self.hStyles = {}
self.colHead = QColor(*self.theTheme.colHead)
self.colHeadH = QColor(*self.theTheme.colHeadH)
@@ -47,6 +49,14 @@ class GuiDocHighlighter(QSyntaxHighlighter):
self.colTagErr = QColor(*self.theTheme.colTagErr)
self.colRepTag = QColor(*self.theTheme.colRepTag)
self.initHighlighter()
logger.debug("DocHighlighter initialisation complete")
return
def initHighlighter(self):
self.hStyles = {
"header1" : self._makeFormat(self.colHead, "bold",1.8),
"header2" : self._makeFormat(self.colHead, "bold",1.6),
@@ -160,9 +170,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
self.rules = [(QRegularExpression(a),b) for (a,b) in self.hRules]
self.spellRx = QRegularExpression(r"\b[^\s]+\b")
logger.debug("DocHighlighter initialisation complete")
return
return True
##
# Setters