diff --git a/docs/source/more_customise.rst b/docs/source/more_customise.rst index 3bc690e1..acbfdb2a 100644 --- a/docs/source/more_customise.rst +++ b/docs/source/more_customise.rst @@ -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. diff --git a/novelwriter/assets/syntax/cyberpunk_night.conf b/novelwriter/assets/syntax/cyberpunk_night.conf index 26685da7..4a838580 100644 --- a/novelwriter/assets/syntax/cyberpunk_night.conf +++ b/novelwriter/assets/syntax/cyberpunk_night.conf @@ -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 diff --git a/novelwriter/assets/syntax/default_dark.conf b/novelwriter/assets/syntax/default_dark.conf index 98a290db..8e467189 100644 --- a/novelwriter/assets/syntax/default_dark.conf +++ b/novelwriter/assets/syntax/default_dark.conf @@ -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 diff --git a/novelwriter/assets/syntax/default_light.conf b/novelwriter/assets/syntax/default_light.conf index f0b7ba25..2e5ae404 100644 --- a/novelwriter/assets/syntax/default_light.conf +++ b/novelwriter/assets/syntax/default_light.conf @@ -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 diff --git a/novelwriter/assets/syntax/dracula.conf b/novelwriter/assets/syntax/dracula.conf index 34180c0e..fad01ea8 100644 --- a/novelwriter/assets/syntax/dracula.conf +++ b/novelwriter/assets/syntax/dracula.conf @@ -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 diff --git a/novelwriter/assets/syntax/grey_dark.conf b/novelwriter/assets/syntax/grey_dark.conf index ed30ba74..cc36478c 100644 --- a/novelwriter/assets/syntax/grey_dark.conf +++ b/novelwriter/assets/syntax/grey_dark.conf @@ -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 diff --git a/novelwriter/assets/syntax/grey_light.conf b/novelwriter/assets/syntax/grey_light.conf index 64a478da..80a8a01c 100644 --- a/novelwriter/assets/syntax/grey_light.conf +++ b/novelwriter/assets/syntax/grey_light.conf @@ -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 diff --git a/novelwriter/assets/syntax/light_owl.conf b/novelwriter/assets/syntax/light_owl.conf index 8ad302ce..ce65e704 100644 --- a/novelwriter/assets/syntax/light_owl.conf +++ b/novelwriter/assets/syntax/light_owl.conf @@ -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 diff --git a/novelwriter/assets/syntax/night_owl.conf b/novelwriter/assets/syntax/night_owl.conf index 17b231e5..337cdfb8 100644 --- a/novelwriter/assets/syntax/night_owl.conf +++ b/novelwriter/assets/syntax/night_owl.conf @@ -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 diff --git a/novelwriter/assets/syntax/snazzy.conf b/novelwriter/assets/syntax/snazzy.conf index 8f44fd43..da979a00 100644 --- a/novelwriter/assets/syntax/snazzy.conf +++ b/novelwriter/assets/syntax/snazzy.conf @@ -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 diff --git a/novelwriter/assets/syntax/solarized_dark.conf b/novelwriter/assets/syntax/solarized_dark.conf index 0529e96b..0fbacdb7 100644 --- a/novelwriter/assets/syntax/solarized_dark.conf +++ b/novelwriter/assets/syntax/solarized_dark.conf @@ -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 diff --git a/novelwriter/assets/syntax/solarized_light.conf b/novelwriter/assets/syntax/solarized_light.conf index 8366c438..525a59e5 100644 --- a/novelwriter/assets/syntax/solarized_light.conf +++ b/novelwriter/assets/syntax/solarized_light.conf @@ -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 diff --git a/novelwriter/assets/syntax/tango.conf b/novelwriter/assets/syntax/tango.conf index 2ee5c3f5..7c5e9daa 100644 --- a/novelwriter/assets/syntax/tango.conf +++ b/novelwriter/assets/syntax/tango.conf @@ -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 diff --git a/novelwriter/assets/syntax/tomorrow.conf b/novelwriter/assets/syntax/tomorrow.conf index 1e84f0fd..d3d2b8e4 100644 --- a/novelwriter/assets/syntax/tomorrow.conf +++ b/novelwriter/assets/syntax/tomorrow.conf @@ -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 diff --git a/novelwriter/assets/syntax/tomorrow_night.conf b/novelwriter/assets/syntax/tomorrow_night.conf index 0814e46e..15257945 100644 --- a/novelwriter/assets/syntax/tomorrow_night.conf +++ b/novelwriter/assets/syntax/tomorrow_night.conf @@ -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 diff --git a/novelwriter/assets/syntax/tomorrow_night_blue.conf b/novelwriter/assets/syntax/tomorrow_night_blue.conf index ea1aa6da..89067e4f 100644 --- a/novelwriter/assets/syntax/tomorrow_night_blue.conf +++ b/novelwriter/assets/syntax/tomorrow_night_blue.conf @@ -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 diff --git a/novelwriter/assets/syntax/tomorrow_night_bright.conf b/novelwriter/assets/syntax/tomorrow_night_bright.conf index c4969ad5..0f1fd055 100644 --- a/novelwriter/assets/syntax/tomorrow_night_bright.conf +++ b/novelwriter/assets/syntax/tomorrow_night_bright.conf @@ -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 diff --git a/novelwriter/assets/syntax/tomorrow_night_eighties.conf b/novelwriter/assets/syntax/tomorrow_night_eighties.conf index a5c9c651..a638a871 100644 --- a/novelwriter/assets/syntax/tomorrow_night_eighties.conf +++ b/novelwriter/assets/syntax/tomorrow_night_eighties.conf @@ -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 diff --git a/novelwriter/gui/dochighlight.py b/novelwriter/gui/dochighlight.py index 361b7139..0039f6bb 100644 --- a/novelwriter/gui/dochighlight.py +++ b/novelwriter/gui/dochighlight.py @@ -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() diff --git a/novelwriter/gui/theme.py b/novelwriter/gui/theme.py index ebcf5e04..f9c26b2e 100644 --- a/novelwriter/gui/theme.py +++ b/novelwriter/gui/theme.py @@ -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")