Added dark tomorrow theme and separated gui theme from syntax

This commit is contained in:
Veronica K. B. Olsen
2019-06-15 15:24:29 +02:00
parent 4cb42339ce
commit 583e10adec
15 changed files with 239 additions and 91 deletions
+6 -8
View File
@@ -134,7 +134,6 @@ class GuiDocEditor(QTextEdit):
# Set text fixed width, or alternatively, just margins
self.qDocument.setDocumentMargin(self.mainConf.textMargin)
self.changeWidth()
# Also set the document text options for the document text flow
theOpt = QTextOption()
@@ -147,10 +146,13 @@ class GuiDocEditor(QTextEdit):
# If we have a document open, we should reload it in case the font changed
if self.theHandle is not None:
tHandle = self.theHandle
self.hLight.initHighlighter()
self.clearEditor()
self.loadText(tHandle)
self.hLight.initHighlighter()
self.hLight.rehighlight()
self.changeWidth()
return True
def loadText(self, tHandle):
@@ -220,18 +222,14 @@ class GuiDocEditor(QTextEdit):
def setSpellCheck(self, theMode):
self.spellCheck = theMode
self.hLight.setSpellCheck(theMode)
self.rehighlightDocument()
self.hLight.rehighlight()
return True
def updateSpellCheck(self):
if self.spellCheck:
self.rehighlightDocument()
self.hLight.rehighlight()
return True
def rehighlightDocument(self):
self.hLight.rehighlight()
return
##
# General Class Methods
##