diff --git a/nw/gui/dochighlight.py b/nw/gui/dochighlight.py index 2287e535..3943928b 100644 --- a/nw/gui/dochighlight.py +++ b/nw/gui/dochighlight.py @@ -26,25 +26,31 @@ class GuiDocHighlighter(QSyntaxHighlighter): logger.debug("Initialising DocHighlighter ...") self.mainConf = nw.CONFIG self.theDoc = theDoc + self.hRules = [] self.colHead = ( 0,155,200,255) + self.colHeadH = ( 0,105,135,255) self.colEmph = (200,120, 0,255) - self.colDialN = (48, 200, 0,255) + self.colDialN = (200, 46, 0,255) self.colDialD = (184,200, 0,255) self.colDialS = (136,200, 0,255) - self.colComm = (120,120,120,255) + self.colComm = (150,150,150,255) self.colKey = (200, 0, 0,255) self.colVal = (184,200, 0,255) self.hStyles = { - "header1" : self._makeFormat(self.colHead,"bold",1.8), - "header2" : self._makeFormat(self.colHead,"bold",1.6), - "header3" : self._makeFormat(self.colHead,"bold",1.4), - "header4" : self._makeFormat(self.colHead,"bold",1.2), - "bold" : self._makeFormat(self.colEmph,"bold"), - "italic" : self._makeFormat(self.colEmph,"italic"), - "strike" : self._makeFormat(self.colEmph,"strike"), - "underline" : self._makeFormat(self.colEmph,"underline"), + "header1" : self._makeFormat(self.colHead, "bold",1.8), + "header2" : self._makeFormat(self.colHead, "bold",1.6), + "header3" : self._makeFormat(self.colHead, "bold",1.4), + "header4" : self._makeFormat(self.colHead, "bold",1.2), + "header1h" : self._makeFormat(self.colHeadH,"bold",1.8), + "header2h" : self._makeFormat(self.colHeadH,"bold",1.6), + "header3h" : self._makeFormat(self.colHeadH,"bold",1.4), + "header4h" : self._makeFormat(self.colHeadH,"bold",1.2), + "bold" : self._makeFormat(self.colEmph, "bold"), + "italic" : self._makeFormat(self.colEmph, "italic"), + "strike" : self._makeFormat(self.colEmph, "strike"), + "underline" : self._makeFormat(self.colEmph, "underline"), "dialogue1" : self._makeFormat(self.colDialN), "dialogue2" : self._makeFormat(self.colDialD), "dialogue3" : self._makeFormat(self.colDialS), @@ -53,30 +59,89 @@ class GuiDocHighlighter(QSyntaxHighlighter): "value" : self._makeFormat(self.colVal), } - self.hRules = [ - (r"^#{1}[^#].*[^\n]", 0, self.hStyles["header1"]), - (r"^#{2}[^#].*[^\n]", 0, self.hStyles["header2"]), - (r"^#{3}[^#].*[^\n]", 0, self.hStyles["header3"]), - (r"^#{4}[^#].*[^\n]", 0, self.hStyles["header4"]), - (r"(?