Update syntax themes and add alternative dialog colour

This commit is contained in:
Veronica Berglyd Olsen
2024-05-13 17:57:19 +02:00
parent e5e3066b3d
commit 7e35b4c675
20 changed files with 69 additions and 83 deletions
+4 -4
View File
@@ -168,9 +168,8 @@ A syntax theme ``.conf`` file consists of the following settings:
headertext = 0, 0, 0
headertag = 0, 0, 0
emphasis = 0, 0, 0
straightquotes = 0, 0, 0
doublequotes = 0, 0, 0
singlequotes = 0, 0, 0
dialog = 0, 0, 0
altdialog = 0, 0, 0
note = 0, 0, 0
hidden = 0, 0, 0
shortcode = 0, 0, 0
@@ -201,4 +200,5 @@ Omitted syntax colours default to black, except ``background`` which defaults to
The ``texthighlight`` syntax colour entry was added.
.. versionadded:: 2.5
The ``note`` and ``tag`` syntax colour entries were added.
The ``dialog``, ``altdialog``, ``note`` and ``tag`` syntax colour entries were added.
``straightquotes``, ``doublequotes`` and ``singlequotes`` were removed.
@@ -12,9 +12,8 @@ link = 77, 077, 255
headertext = 255, 255, 255
headertag = 50, 0, 180
emphasis = 0, 255, 255
straightquotes = 7, 27, 219
doublequotes = 0, 255, 0
singlequotes = 0, 140, 255
dialog = 0, 255, 0
altdialog = 0, 140, 255
note = 150, 150, 150
hidden = 77, 77, 100
shortcode = 255, 255, 0
+2 -3
View File
@@ -26,9 +26,8 @@ link = 102, 153, 204
headertext = 153, 204, 153
headertag = 153, 204, 153, 160
emphasis = 249, 145, 87
straightquotes = 230, 66, 80
doublequotes = 102, 153, 204
singlequotes = 102, 153, 204
dialog = 102, 153, 204
altdialog = 102, 153, 204
note = 255, 255, 216
hidden = 150, 150, 150
shortcode = 153, 204, 153
+2 -3
View File
@@ -26,9 +26,8 @@ link = 0, 0, 200
headertext = 0, 100, 0
headertag = 0, 100, 0, 160
emphasis = 174, 110, 30
straightquotes = 200, 50, 50
doublequotes = 0, 0, 200
singlequotes = 0, 0, 200
dialog = 0, 0, 200
altdialog = 0, 0, 200
note = 100, 100, 0
hidden = 100, 100, 100
shortcode = 0, 100, 0
+2 -3
View File
@@ -28,9 +28,8 @@ link = 255, 121, 198
headertext = 189, 147, 249
headertag = 189, 147, 249, 160
emphasis = 255, 184, 108
straightquotes = 255, 85, 85
doublequotes = 80, 250, 123
singlequotes = 241, 250, 140
dialog = 80, 250, 123
altdialog = 241, 250, 140
note = 255, 204, 233
hidden = 98, 114, 164
shortcode = 139, 233, 253
+2 -3
View File
@@ -13,9 +13,8 @@ link = 200, 200, 200
headertext = 225, 225, 225
headertag = 225, 225, 225, 160
emphasis = 200, 200, 200
straightquotes = 200, 200, 200
doublequotes = 200, 200, 200
singlequotes = 200, 200, 200
dialog = 200, 200, 200
altdialog = 200, 200, 200
note = 200, 200, 200
hidden = 150, 150, 150
shortcode = 225, 225, 225
+2 -3
View File
@@ -13,9 +13,8 @@ link = 20, 20, 20
headertext = 0, 0, 0
headertag = 0, 0, 0, 160
emphasis = 20, 20, 20
straightquotes = 20, 20, 20
doublequotes = 20, 20, 20
singlequotes = 20, 20, 20
dialog = 20, 20, 20
altdialog = 20, 20, 20
note = 20, 20, 20
hidden = 100, 100, 100
shortcode = 0, 0, 0
+2 -3
View File
@@ -33,9 +33,8 @@ link = 40, 142, 215
headertext = 40, 142, 215
headertag = 40, 142, 215, 160
emphasis = 224, 175, 5
straightquotes = 222, 61, 58
doublequotes = 8, 145, 106
singlequotes = 218, 170, 1
dialog = 8, 145, 106
altdialog = 218, 170, 1
note = 128, 118, 75
hidden = 152, 159, 177
shortcode = 40, 142, 215
+2 -3
View File
@@ -33,9 +33,8 @@ link = 130, 170, 255
headertext = 130, 170, 255
headertag = 130, 170, 255, 160
emphasis = 236, 196, 141
straightquotes = 247, 140, 108
doublequotes = 173, 219, 103
singlequotes = 255, 235, 149
dialog = 173, 219, 103
altdialog = 255, 235, 149
note = 255, 249, 202
hidden = 99, 119, 119
shortcode = 130, 170, 255
+2 -3
View File
@@ -26,9 +26,8 @@ link = 9, 161, 237
headertext = 45, 174, 88
headertag = 45, 174, 88, 160
emphasis = 19, 187, 183
straightquotes = 255, 92, 87
doublequotes = 207, 156, 0
singlequotes = 207, 156, 0
dialog = 207, 156, 0
altdialog = 207, 156, 0
note = 120, 187, 185
hidden = 145, 148, 162
shortcode = 247, 103, 187
@@ -13,9 +13,8 @@ link = 38, 139, 210
headertext = 147, 161, 161
headertag = 42, 161, 152
emphasis = 38, 139, 210
straightquotes = 211, 54, 130
doublequotes = 42, 161, 152
singlequotes = 42, 161, 152
dialog = 42, 161, 152
altdialog = 42, 161, 152
note = 101, 161, 156
hidden = 147, 161, 161
shortcode = 147, 161, 161
@@ -13,9 +13,8 @@ link = 38, 139, 210
headertext = 88, 110, 117
headertag = 42, 161, 152
emphasis = 38, 139, 210
straightquotes = 211, 54, 130
doublequotes = 42, 161, 152
singlequotes = 42, 161, 152
dialog = 42, 161, 152
altdialog = 42, 161, 152
note = 27, 102, 96
hidden = 88, 110, 117
shortcode = 88, 110, 117
+2 -3
View File
@@ -23,9 +23,8 @@ link = 114, 159, 207
headertext = 114, 159, 207
headertag = 114, 159, 207, 160
emphasis = 196, 160, 0
straightquotes = 239, 41, 41
doublequotes = 138, 226, 52
singlequotes = 252, 233, 79
dialog = 138, 226, 52
altdialog = 252, 233, 79
note = 252, 242, 164
hidden = 143, 143, 141
shortcode = 114, 159, 207
+2 -3
View File
@@ -33,9 +33,8 @@ link = 66, 113, 174
headertext = 66, 113, 174
headertag = 66, 113, 174, 160
emphasis = 245, 135, 31
straightquotes = 240, 40, 41
doublequotes = 113, 140, 0
singlequotes = 234, 183, 0
dialog = 113, 140, 0
altdialog = 234, 183, 0
note = 115, 90, 0
hidden = 142, 144, 140
shortcode = 66, 113, 174
@@ -33,9 +33,8 @@ link = 197, 200, 198, 160
headertext = 129, 162, 190
headertag = 94, 119, 139
emphasis = 222, 147, 95
straightquotes = 204, 102, 102
doublequotes = 181, 189, 104
singlequotes = 240, 198, 116
dialog = 181, 189, 104
altdialog = 240, 198, 116
note = 240, 219, 178
hidden = 150, 152, 150
shortcode = 129, 162, 190
@@ -33,9 +33,8 @@ link = 187, 218, 255
headertext = 187, 218, 255
headertag = 187, 218, 255, 160
emphasis = 255, 197, 143
straightquotes = 255, 157, 164
doublequotes = 209, 241, 169
singlequotes = 255, 238, 173
dialog = 209, 241, 169
altdialog = 255, 238, 173
note = 255, 247, 214
hidden = 114, 133, 183
shortcode = 187, 218, 255
@@ -33,9 +33,8 @@ link = 122, 166, 218
headertext = 122, 166, 218
headertag = 122, 166, 218, 160
emphasis = 231, 140, 69
straightquotes = 213, 78, 83
doublequotes = 185, 202, 74
singlequotes = 231, 197, 71
dialog = 185, 202, 74
altdialog = 231, 197, 71
note = 231, 214, 150
hidden = 150, 152, 150
shortcode = 122, 166, 218
@@ -33,9 +33,8 @@ link = 102, 153, 204
headertext = 102, 153, 204
headertag = 102, 153, 204, 160
emphasis = 249, 145, 57
straightquotes = 242, 119, 122
doublequotes = 153, 204, 153
singlequotes = 255, 204, 102
dialog = 153, 204, 153
altdialog = 255, 204, 102
note = 255, 230, 179
hidden = 153, 153, 153
shortcode = 102, 153, 204
+27 -26
View File
@@ -94,32 +94,33 @@ class GuiDocHighlighter(QSyntaxHighlighter):
colBreak.setAlpha(64)
# Create Character Formats
self._addCharFormat("text", SHARED.theme.colText)
self._addCharFormat("header1", SHARED.theme.colHead, "b", 1.8)
self._addCharFormat("header2", SHARED.theme.colHead, "b", 1.6)
self._addCharFormat("header3", SHARED.theme.colHead, "b", 1.4)
self._addCharFormat("header4", SHARED.theme.colHead, "b", 1.2)
self._addCharFormat("head1h", SHARED.theme.colHeadH, "b", 1.8)
self._addCharFormat("head2h", SHARED.theme.colHeadH, "b", 1.6)
self._addCharFormat("head3h", SHARED.theme.colHeadH, "b", 1.4)
self._addCharFormat("head4h", SHARED.theme.colHeadH, "b", 1.2)
self._addCharFormat("bold", colEmph, "b")
self._addCharFormat("italic", colEmph, "i")
self._addCharFormat("strike", SHARED.theme.colHidden, "s")
self._addCharFormat("mspaces", SHARED.theme.colError, "err")
self._addCharFormat("nobreak", colBreak, "bg")
self._addCharFormat("dialog", SHARED.theme.colDialog)
self._addCharFormat("replace", SHARED.theme.colRepTag)
self._addCharFormat("hidden", SHARED.theme.colHidden)
self._addCharFormat("markup", SHARED.theme.colHidden)
self._addCharFormat("note", SHARED.theme.colNote)
self._addCharFormat("code", SHARED.theme.colCode)
self._addCharFormat("keyword", SHARED.theme.colKey)
self._addCharFormat("tag", SHARED.theme.colTag)
self._addCharFormat("modifier", SHARED.theme.colMod)
self._addCharFormat("value", SHARED.theme.colVal)
self._addCharFormat("optional", SHARED.theme.colOpt)
self._addCharFormat("invalid", None, "err")
self._addCharFormat("text", SHARED.theme.colText)
self._addCharFormat("header1", SHARED.theme.colHead, "b", 1.8)
self._addCharFormat("header2", SHARED.theme.colHead, "b", 1.6)
self._addCharFormat("header3", SHARED.theme.colHead, "b", 1.4)
self._addCharFormat("header4", SHARED.theme.colHead, "b", 1.2)
self._addCharFormat("head1h", SHARED.theme.colHeadH, "b", 1.8)
self._addCharFormat("head2h", SHARED.theme.colHeadH, "b", 1.6)
self._addCharFormat("head3h", SHARED.theme.colHeadH, "b", 1.4)
self._addCharFormat("head4h", SHARED.theme.colHeadH, "b", 1.2)
self._addCharFormat("bold", colEmph, "b")
self._addCharFormat("italic", colEmph, "i")
self._addCharFormat("strike", SHARED.theme.colHidden, "s")
self._addCharFormat("mspaces", SHARED.theme.colError, "err")
self._addCharFormat("nobreak", colBreak, "bg")
self._addCharFormat("altdialog", SHARED.theme.colDialA)
self._addCharFormat("dialog", SHARED.theme.colDialN)
self._addCharFormat("replace", SHARED.theme.colRepTag)
self._addCharFormat("hidden", SHARED.theme.colHidden)
self._addCharFormat("markup", SHARED.theme.colHidden)
self._addCharFormat("note", SHARED.theme.colNote)
self._addCharFormat("code", SHARED.theme.colCode)
self._addCharFormat("keyword", SHARED.theme.colKey)
self._addCharFormat("tag", SHARED.theme.colTag)
self._addCharFormat("modifier", SHARED.theme.colMod)
self._addCharFormat("value", SHARED.theme.colVal)
self._addCharFormat("optional", SHARED.theme.colOpt)
self._addCharFormat("invalid", None, "err")
# Cache Spell Error Format
self._spellErr = QTextCharFormat()
+4 -2
View File
@@ -95,7 +95,8 @@ class GuiTheme:
self.colHead = QColor(0, 0, 0)
self.colHeadH = QColor(0, 0, 0)
self.colEmph = QColor(0, 0, 0)
self.colDialog = QColor(0, 0, 0)
self.colDialN = QColor(0, 0, 0)
self.colDialA = QColor(0, 0, 0)
self.colHidden = QColor(0, 0, 0)
self.colNote = QColor(0, 0, 0)
self.colCode = QColor(0, 0, 0)
@@ -336,7 +337,8 @@ class GuiTheme:
self.colHead = self._parseColour(confParser, cnfSec, "headertext")
self.colHeadH = self._parseColour(confParser, cnfSec, "headertag")
self.colEmph = self._parseColour(confParser, cnfSec, "emphasis")
self.colDialog = self._parseColour(confParser, cnfSec, "dialog")
self.colDialN = self._parseColour(confParser, cnfSec, "dialog")
self.colDialA = self._parseColour(confParser, cnfSec, "altdialog")
self.colHidden = self._parseColour(confParser, cnfSec, "hidden")
self.colNote = self._parseColour(confParser, cnfSec, "note")
self.colCode = self._parseColour(confParser, cnfSec, "shortcode")