Add theme field for white space
This commit is contained in:
@@ -94,8 +94,6 @@ class GuiDocHighlighter(QSyntaxHighlighter):
|
||||
syntax = SHARED.theme.syntaxTheme
|
||||
|
||||
colEmph = syntax.emph if CONFIG.highlightEmph else None
|
||||
colBreak = QColor(syntax.emph)
|
||||
colBreak.setAlpha(64)
|
||||
|
||||
# Create Character Formats
|
||||
self._addCharFormat("text", syntax.text)
|
||||
@@ -112,7 +110,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
|
||||
self._addCharFormat("strike", syntax.hidden, "s")
|
||||
self._addCharFormat("mark", syntax.mark, "bg")
|
||||
self._addCharFormat("mspaces", syntax.error, "err")
|
||||
self._addCharFormat("nobreak", colBreak, "bg")
|
||||
self._addCharFormat("nobreak", syntax.space, "bg")
|
||||
self._addCharFormat("altdialog", syntax.dialA)
|
||||
self._addCharFormat("dialog", syntax.dialN)
|
||||
self._addCharFormat("replace", syntax.repTag)
|
||||
|
||||
@@ -114,6 +114,7 @@ class SyntaxColors:
|
||||
head: QColor = QColor(0, 0, 0)
|
||||
headH: QColor = QColor(0, 0, 0)
|
||||
emph: QColor = QColor(0, 0, 0)
|
||||
space: QColor = QColor(0, 0, 0)
|
||||
dialN: QColor = QColor(0, 0, 0)
|
||||
dialA: QColor = QColor(0, 0, 0)
|
||||
hidden: QColor = QColor(0, 0, 0)
|
||||
@@ -393,6 +394,7 @@ class GuiTheme:
|
||||
self.syntaxTheme.head = self._readColor(parser, sec, "headertext")
|
||||
self.syntaxTheme.headH = self._readColor(parser, sec, "headertag")
|
||||
self.syntaxTheme.emph = self._readColor(parser, sec, "emphasis")
|
||||
self.syntaxTheme.space = self._readColor(parser, sec, "whitespace")
|
||||
self.syntaxTheme.dialN = self._readColor(parser, sec, "dialog")
|
||||
self.syntaxTheme.dialA = self._readColor(parser, sec, "altdialog")
|
||||
self.syntaxTheme.hidden = self._readColor(parser, sec, "hidden")
|
||||
|
||||
@@ -635,9 +635,10 @@ def testGuiTheme_CheckTheme(theme):
|
||||
],
|
||||
"Syntax": [
|
||||
"background", "text", "line", "link", "headertext", "headertag",
|
||||
"emphasis", "dialog", "altdialog", "hidden", "note", "shortcode",
|
||||
"keyword", "tag", "value", "optional", "spellcheckline",
|
||||
"errorline", "replacetag", "modifier", "texthighlight",
|
||||
"emphasis", "whitespace", "dialog", "altdialog", "hidden", "note",
|
||||
"shortcode", "keyword", "tag", "value", "optional",
|
||||
"spellcheckline", "errorline", "replacetag", "modifier",
|
||||
"texthighlight",
|
||||
],
|
||||
}
|
||||
optional = ["credit", "url"]
|
||||
|
||||
Reference in New Issue
Block a user