Added colour for tag errors
This commit is contained in:
@@ -44,6 +44,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
|
||||
self.colKey = QColor(*self.theTheme.colKey)
|
||||
self.colVal = QColor(*self.theTheme.colVal)
|
||||
self.colSpell = QColor(*self.theTheme.colSpell)
|
||||
self.colTagErr = QColor(*self.theTheme.colTagErr)
|
||||
|
||||
self.hStyles = {
|
||||
"header1" : self._makeFormat(self.colHead, "bold",1.8),
|
||||
@@ -197,7 +198,7 @@ class GuiDocHighlighter(QSyntaxHighlighter):
|
||||
self.setFormat(xPos, xLen, self.hStyles["value"])
|
||||
else:
|
||||
kwFmt = self.format(xPos)
|
||||
kwFmt.setUnderlineColor(self.colSpell)
|
||||
kwFmt.setUnderlineColor(self.colTagErr)
|
||||
kwFmt.setUnderlineStyle(QTextCharFormat.SpellCheckUnderline)
|
||||
self.setFormat(xPos, xLen, kwFmt)
|
||||
|
||||
|
||||
+2
-2
@@ -266,7 +266,7 @@ class NWIndex():
|
||||
if nBits == 0:
|
||||
return []
|
||||
|
||||
# If we have a tag, the first value is always OK, rest is ignored
|
||||
# If we have a tag, only the first value is accepted, the rest is ignored
|
||||
if theBits[0] == self.TAG_KEY and nBits > 1:
|
||||
isGood[0] = True
|
||||
if theBits[1] in self.tagIndex.keys():
|
||||
@@ -278,7 +278,7 @@ class NWIndex():
|
||||
isGood[1] = True
|
||||
return isGood
|
||||
|
||||
# If we're still here, we better check the references
|
||||
# If we're still here, we better check that the references exist
|
||||
if tItem.itemClass == nwItemClass.NOVEL:
|
||||
isGood[0] = theBits[0] in self.NOVEL_KEYS
|
||||
else:
|
||||
|
||||
@@ -37,6 +37,7 @@ class Theme:
|
||||
self.colKey = [0,0,0]
|
||||
self.colVal = [0,0,0]
|
||||
self.colSpell = [0,0,0]
|
||||
self.colTagErr = [0,0,0]
|
||||
|
||||
# Changeable Settings
|
||||
self.guiTheme = None
|
||||
@@ -94,6 +95,7 @@ class Theme:
|
||||
self.colKey = self._loadColour(confParser,cnfSec,"keyword")
|
||||
self.colVal = self._loadColour(confParser,cnfSec,"value")
|
||||
self.colSpell = self._loadColour(confParser,cnfSec,"spellcheckline")
|
||||
self.colTagErr = self._loadColour(confParser,cnfSec,"tagerror")
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@@ -9,3 +9,4 @@ hidden = 150, 150, 150
|
||||
keyword = 200, 46, 0
|
||||
value = 184, 200, 0
|
||||
spellcheckline = 200, 46, 0
|
||||
tagerror = 46, 200, 0
|
||||
|
||||
Reference in New Issue
Block a user