diff --git a/nw/assets/themes/syntax/default_dark.conf b/nw/assets/themes/syntax/default_dark.conf index 8d1cd6b4..b5658bfc 100644 --- a/nw/assets/themes/syntax/default_dark.conf +++ b/nw/assets/themes/syntax/default_dark.conf @@ -17,3 +17,4 @@ value = 184, 200, 0 spellcheckline = 200, 46, 0 tagerror = 46, 200, 0 replacetag = 0, 184, 46 +modifier = 200, 120, 0 diff --git a/nw/assets/themes/syntax/default_light.conf b/nw/assets/themes/syntax/default_light.conf index 709a1ab2..07eea504 100644 --- a/nw/assets/themes/syntax/default_light.conf +++ b/nw/assets/themes/syntax/default_light.conf @@ -17,3 +17,4 @@ value = 50, 150, 50 spellcheckline = 200, 0, 0 tagerror = 0, 150, 0 replacetag = 0, 150, 0 +modifier = 150, 110, 30 diff --git a/nw/assets/themes/syntax/light_owl.conf b/nw/assets/themes/syntax/light_owl.conf index 8f6b54a5..788cea2c 100644 --- a/nw/assets/themes/syntax/light_owl.conf +++ b/nw/assets/themes/syntax/light_owl.conf @@ -40,3 +40,4 @@ value = 150, 74, 193 spellcheckline = 222, 61, 58 tagerror = 8, 145, 106 replacetag = 42, 162, 152 +modifier = 224, 175, 5 diff --git a/nw/assets/themes/syntax/night_owl.conf b/nw/assets/themes/syntax/night_owl.conf index 32d22ddf..33fbf47e 100644 --- a/nw/assets/themes/syntax/night_owl.conf +++ b/nw/assets/themes/syntax/night_owl.conf @@ -40,3 +40,4 @@ value = 199, 146, 234 spellcheckline = 247, 140, 108 tagerror = 173, 219, 103 replacetag = 127, 219, 202 +modifier = 236, 196, 141 diff --git a/nw/assets/themes/syntax/tomorrow.conf b/nw/assets/themes/syntax/tomorrow.conf index 909e9d65..26435950 100644 --- a/nw/assets/themes/syntax/tomorrow.conf +++ b/nw/assets/themes/syntax/tomorrow.conf @@ -40,3 +40,4 @@ value = 137, 89, 168 spellcheckline = 240, 40, 41 tagerror = 113, 140, 0 replacetag = 62, 153, 159 +modifier = 245, 135, 31 diff --git a/nw/assets/themes/syntax/tomorrow_night.conf b/nw/assets/themes/syntax/tomorrow_night.conf index 09966ff0..817f255a 100644 --- a/nw/assets/themes/syntax/tomorrow_night.conf +++ b/nw/assets/themes/syntax/tomorrow_night.conf @@ -40,3 +40,4 @@ value = 178, 148, 187 spellcheckline = 204, 102, 102 tagerror = 181, 189, 104 replacetag = 138, 190, 183 +modifier = 222, 147, 95 diff --git a/nw/assets/themes/syntax/tomorrow_night_blue.conf b/nw/assets/themes/syntax/tomorrow_night_blue.conf index d05a757b..e1c36135 100644 --- a/nw/assets/themes/syntax/tomorrow_night_blue.conf +++ b/nw/assets/themes/syntax/tomorrow_night_blue.conf @@ -40,3 +40,4 @@ value = 235, 187, 255 spellcheckline = 255, 157, 164 tagerror = 209, 241, 169 replacetag = 153, 255, 255 +modifier = 255, 197, 143 diff --git a/nw/assets/themes/syntax/tomorrow_night_bright.conf b/nw/assets/themes/syntax/tomorrow_night_bright.conf index 0d9c6c3a..1c4122e3 100644 --- a/nw/assets/themes/syntax/tomorrow_night_bright.conf +++ b/nw/assets/themes/syntax/tomorrow_night_bright.conf @@ -40,3 +40,4 @@ value = 195, 151, 216 spellcheckline = 213, 78, 83 tagerror = 185, 202, 74 replacetag = 112, 192, 177 +modifier = 231, 140, 69 diff --git a/nw/assets/themes/syntax/tomorrow_night_eighties.conf b/nw/assets/themes/syntax/tomorrow_night_eighties.conf index 5bd0c222..e75ffe31 100644 --- a/nw/assets/themes/syntax/tomorrow_night_eighties.conf +++ b/nw/assets/themes/syntax/tomorrow_night_eighties.conf @@ -40,3 +40,4 @@ value = 204, 153, 204 spellcheckline = 242, 119, 122 tagerror = 153, 204, 153 replacetag = 102, 204, 204 +modifier = 249, 145, 57 diff --git a/nw/gui/theme.py b/nw/gui/theme.py index 8eb74502..e200361c 100644 --- a/nw/gui/theme.py +++ b/nw/gui/theme.py @@ -78,6 +78,7 @@ class GuiTheme: self.colSpell = [ 0, 0, 0] self.colTagErr = [ 0, 0, 0] self.colRepTag = [ 0, 0, 0] + self.colMod = [ 0, 0, 0] # Changeable Settings self.guiTheme = None @@ -217,6 +218,7 @@ class GuiTheme: self.colSpell = self._loadColour(confParser, cnfSec, "spellcheckline") self.colTagErr = self._loadColour(confParser, cnfSec, "tagerror") self.colRepTag = self._loadColour(confParser, cnfSec, "replacetag") + self.colMod = self._loadColour(confParser, cnfSec, "modifier") logger.info("Loaded syntax theme '%s'" % self.guiSyntax) diff --git a/nw/gui/tools/dochighlight.py b/nw/gui/tools/dochighlight.py index f20aece1..dc679c0a 100644 --- a/nw/gui/tools/dochighlight.py +++ b/nw/gui/tools/dochighlight.py @@ -75,6 +75,7 @@ class GuiDocHighlighter(QSyntaxHighlighter): self.colSpell = QColor(*self.theTheme.colSpell) self.colTagErr = QColor(*self.theTheme.colTagErr) self.colRepTag = QColor(*self.theTheme.colRepTag) + self.colMod = QColor(*self.theTheme.colMod) self.colTrail = QColor(*self.theTheme.colEmph,64) self.hStyles = { @@ -98,6 +99,7 @@ class GuiDocHighlighter(QSyntaxHighlighter): "replace" : self._makeFormat(self.colRepTag), "hidden" : self._makeFormat(self.colComm), "keyword" : self._makeFormat(self.colKey), + "modifier" : self._makeFormat(self.colMod), "value" : self._makeFormat(self.colVal), } @@ -250,7 +252,11 @@ class GuiDocHighlighter(QSyntaxHighlighter): self.setFormat(4, len(theText), self.hStyles["header4"]) elif theText.startswith("%"): # Comments - self.setFormat(0, len(theText), self.hStyles["hidden"]) + if theText.startswith("%synopsis:"): + self.setFormat(0, 10, self.hStyles["modifier"]) + self.setFormat(10, len(theText), self.hStyles["hidden"]) + else: + self.setFormat(0, len(theText), self.hStyles["hidden"]) else: # Text Paragraph for rX, xFmt in self.rxRules: