From 503e7eceb50d087edf30267ed2ee9a80f678ba2e Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:07:10 +0200 Subject: [PATCH 1/6] Make default syntax themes consistent --- novelwriter/assets/syntax/default_dark.conf | 32 ++++++++++---------- novelwriter/assets/syntax/default_light.conf | 31 +++++++++++++------ novelwriter/assets/syntax/grey_dark.conf | 2 +- novelwriter/assets/syntax/grey_light.conf | 2 +- 4 files changed, 40 insertions(+), 27 deletions(-) diff --git a/novelwriter/assets/syntax/default_dark.conf b/novelwriter/assets/syntax/default_dark.conf index 293fe6ba6..98a290dbd 100644 --- a/novelwriter/assets/syntax/default_dark.conf +++ b/novelwriter/assets/syntax/default_dark.conf @@ -8,10 +8,10 @@ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ ## # Colours: -# Background = 2a2a2a : 54, 54, 54 +# Background = 2a2a2a : 42, 42, 42 # Foreground = cccccc : 204, 204, 204 # Comment = 969696 : 150, 150, 150 -# Red = d72837 : 215, 40, 55 +# Red = e64250 : 230, 66, 80 # Orange = f99157 : 249, 145, 87 # Yellow = ffff84 : 255, 255, 132 # Green = 99cc99 : 153, 204, 153 @@ -23,21 +23,21 @@ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ background = 42, 42, 42 text = 204, 204, 204 link = 102, 153, 204 -headertext = 102, 153, 204 -headertag = 77, 115, 153 -emphasis = 102, 153, 204 -straightquotes = 215, 40, 55 -doublequotes = 153, 204, 153 -singlequotes = 153, 204, 153 +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 note = 255, 255, 216 hidden = 150, 150, 150 -shortcode = 249, 145, 87 -keyword = 249, 145, 87 +shortcode = 153, 204, 153 +keyword = 230, 66, 80 tag = 153, 204, 153 -value = 255, 255, 132 -optional = 215, 40, 55 -spellcheckline = 215, 40, 55 +value = 102, 153, 204 +optional = 153, 204, 153 +spellcheckline = 230, 66, 80 errorline = 153, 204, 153 -replacetag = 140, 86, 215 -modifier = 249, 145, 87 -texthighlight = 255, 255, 96, 96 +replacetag = 153, 204, 153 +modifier = 153, 204, 153 +texthighlight = 255, 255, 132, 96 diff --git a/novelwriter/assets/syntax/default_light.conf b/novelwriter/assets/syntax/default_light.conf index 53454e246..f0b7ba254 100644 --- a/novelwriter/assets/syntax/default_light.conf +++ b/novelwriter/assets/syntax/default_light.conf @@ -6,25 +6,38 @@ url = https://github.com/vkbo/novelWriter license = CC BY-SA 4.0 licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ +## +# Colours: +# Background = ffffff : 255, 255, 255 +# Foreground = 000000 : 0, 0, 0 +# Comment = 646464 : 100, 100, 100 +# Red = c83232 : 200, 50, 50 +# Orange = ae6e1e : 174, 110, 30 +# Yellow = 969600 : 150, 150, 0 +# Green = 006400 : 0, 100, 0 +# Blue = 0000c8 : 0, 0, 200 +# Purple = 6400ae : 100, 0, 174 +## + [Syntax] background = 255, 255, 255 text = 0, 0, 0 link = 0, 0, 200 headertext = 0, 100, 0 -headertag = 50, 100, 50 -emphasis = 150, 110, 30 -straightquotes = 200, 0, 0 +headertag = 0, 100, 0, 160 +emphasis = 174, 110, 30 +straightquotes = 200, 50, 50 doublequotes = 0, 0, 200 singlequotes = 0, 0, 200 -note = 100, 0, 200 +note = 100, 100, 0 hidden = 100, 100, 100 shortcode = 0, 100, 0 keyword = 200, 50, 50 -tag = 50, 150, 50 +tag = 0, 100, 0 value = 0, 0, 200 optional = 0, 100, 0 -spellcheckline = 200, 0, 0 -errorline = 0, 150, 0 -replacetag = 0, 150, 0 -modifier = 150, 110, 30 +spellcheckline = 200, 50, 50 +errorline = 0, 100, 0 +replacetag = 0, 100, 0 +modifier = 0, 100, 0 texthighlight = 150, 150, 0, 96 diff --git a/novelwriter/assets/syntax/grey_dark.conf b/novelwriter/assets/syntax/grey_dark.conf index efe843a7b..ed30ba74f 100644 --- a/novelwriter/assets/syntax/grey_dark.conf +++ b/novelwriter/assets/syntax/grey_dark.conf @@ -11,7 +11,7 @@ background = 54, 54, 54 text = 200, 200, 200 link = 200, 200, 200 headertext = 225, 225, 225 -headertag = 225, 225, 225 +headertag = 225, 225, 225, 160 emphasis = 200, 200, 200 straightquotes = 200, 200, 200 doublequotes = 200, 200, 200 diff --git a/novelwriter/assets/syntax/grey_light.conf b/novelwriter/assets/syntax/grey_light.conf index bf1e4c3f8..64a478dad 100644 --- a/novelwriter/assets/syntax/grey_light.conf +++ b/novelwriter/assets/syntax/grey_light.conf @@ -11,7 +11,7 @@ background = 255, 255, 255 text = 20, 20, 20 link = 20, 20, 20 headertext = 0, 0, 0 -headertag = 0, 0, 0 +headertag = 0, 0, 0, 160 emphasis = 20, 20, 20 straightquotes = 20, 20, 20 doublequotes = 20, 20, 20 From e89f1fe5a886c5ce8a6c7597e9ff2f100ae20f9f Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:07:58 +0200 Subject: [PATCH 2/6] Fix some minor issues on other themes --- novelwriter/assets/syntax/cyberpunk_night.conf | 1 + novelwriter/assets/syntax/light_owl.conf | 4 ++-- novelwriter/assets/syntax/night_owl.conf | 4 ++-- novelwriter/assets/syntax/tomorrow.conf | 2 +- novelwriter/assets/syntax/tomorrow_night.conf | 2 +- novelwriter/assets/syntax/tomorrow_night_blue.conf | 2 +- novelwriter/assets/syntax/tomorrow_night_bright.conf | 2 +- novelwriter/assets/syntax/tomorrow_night_eighties.conf | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/novelwriter/assets/syntax/cyberpunk_night.conf b/novelwriter/assets/syntax/cyberpunk_night.conf index 717c938c6..26685da7a 100644 --- a/novelwriter/assets/syntax/cyberpunk_night.conf +++ b/novelwriter/assets/syntax/cyberpunk_night.conf @@ -26,3 +26,4 @@ errorline = 186, 218, 4 replacetag = 0, 0, 180 modifier = 144, 142, 176 optional = 180, 180, 180 +texthighlight = 255, 255, 132, 96 diff --git a/novelwriter/assets/syntax/light_owl.conf b/novelwriter/assets/syntax/light_owl.conf index e747308f0..8ad302ce2 100644 --- a/novelwriter/assets/syntax/light_owl.conf +++ b/novelwriter/assets/syntax/light_owl.conf @@ -31,7 +31,7 @@ background = 251, 251, 251 text = 64, 63, 82 link = 40, 142, 215 headertext = 40, 142, 215 -headertag = 40, 142, 215 +headertag = 40, 142, 215, 160 emphasis = 224, 175, 5 straightquotes = 222, 61, 58 doublequotes = 8, 145, 106 @@ -46,5 +46,5 @@ optional = 40, 142, 215 spellcheckline = 222, 61, 58 errorline = 8, 145, 106 replacetag = 42, 162, 152 -modifier = 224, 175, 5 +modifier = 8, 145, 106 texthighlight = 218, 170, 1, 96 diff --git a/novelwriter/assets/syntax/night_owl.conf b/novelwriter/assets/syntax/night_owl.conf index 5fab8ce8e..17b231e5e 100644 --- a/novelwriter/assets/syntax/night_owl.conf +++ b/novelwriter/assets/syntax/night_owl.conf @@ -31,7 +31,7 @@ background = 1, 22, 39 text = 214, 222, 235 link = 130, 170, 255 headertext = 130, 170, 255 -headertag = 130, 170, 255 +headertag = 130, 170, 255, 160 emphasis = 236, 196, 141 straightquotes = 247, 140, 108 doublequotes = 173, 219, 103 @@ -46,5 +46,5 @@ optional = 130, 170, 255 spellcheckline = 247, 140, 108 errorline = 173, 219, 103 replacetag = 127, 219, 202 -modifier = 236, 196, 141 +modifier = 173, 219, 103 texthighlight = 255, 235, 149, 96 diff --git a/novelwriter/assets/syntax/tomorrow.conf b/novelwriter/assets/syntax/tomorrow.conf index c9fde7652..1e84f0fdb 100644 --- a/novelwriter/assets/syntax/tomorrow.conf +++ b/novelwriter/assets/syntax/tomorrow.conf @@ -31,7 +31,7 @@ background = 255, 255, 255 text = 77, 77, 76 link = 66, 113, 174 headertext = 66, 113, 174 -headertag = 66, 113, 174 +headertag = 66, 113, 174, 160 emphasis = 245, 135, 31 straightquotes = 240, 40, 41 doublequotes = 113, 140, 0 diff --git a/novelwriter/assets/syntax/tomorrow_night.conf b/novelwriter/assets/syntax/tomorrow_night.conf index e34331132..0814e46ef 100644 --- a/novelwriter/assets/syntax/tomorrow_night.conf +++ b/novelwriter/assets/syntax/tomorrow_night.conf @@ -29,7 +29,7 @@ licenseurl = https://github.com/chriskempson/tomorrow-theme/blob/master/LICENSE. [Syntax] background = 29, 31, 33 text = 197, 200, 198 -link = 129, 162, 190 +link = 197, 200, 198, 160 headertext = 129, 162, 190 headertag = 94, 119, 139 emphasis = 222, 147, 95 diff --git a/novelwriter/assets/syntax/tomorrow_night_blue.conf b/novelwriter/assets/syntax/tomorrow_night_blue.conf index 7ffd86f36..ea1aa6da5 100644 --- a/novelwriter/assets/syntax/tomorrow_night_blue.conf +++ b/novelwriter/assets/syntax/tomorrow_night_blue.conf @@ -31,7 +31,7 @@ background = 0, 36, 81 text = 255, 255, 255 link = 187, 218, 255 headertext = 187, 218, 255 -headertag = 140, 164, 191 +headertag = 187, 218, 255, 160 emphasis = 255, 197, 143 straightquotes = 255, 157, 164 doublequotes = 209, 241, 169 diff --git a/novelwriter/assets/syntax/tomorrow_night_bright.conf b/novelwriter/assets/syntax/tomorrow_night_bright.conf index c4101bd4d..c4969ad5e 100644 --- a/novelwriter/assets/syntax/tomorrow_night_bright.conf +++ b/novelwriter/assets/syntax/tomorrow_night_bright.conf @@ -31,7 +31,7 @@ background = 0, 0, 0 text = 234, 234, 234 link = 122, 166, 218 headertext = 122, 166, 218 -headertag = 94, 127, 167 +headertag = 122, 166, 218, 160 emphasis = 231, 140, 69 straightquotes = 213, 78, 83 doublequotes = 185, 202, 74 diff --git a/novelwriter/assets/syntax/tomorrow_night_eighties.conf b/novelwriter/assets/syntax/tomorrow_night_eighties.conf index b33c5e958..a5c9c6516 100644 --- a/novelwriter/assets/syntax/tomorrow_night_eighties.conf +++ b/novelwriter/assets/syntax/tomorrow_night_eighties.conf @@ -31,7 +31,7 @@ background = 45, 45, 45 text = 204, 204, 204 link = 102, 153, 204 headertext = 102, 153, 204 -headertag = 76, 115, 153 +headertag = 102, 153, 204, 160 emphasis = 249, 145, 57 straightquotes = 242, 119, 122 doublequotes = 153, 204, 153 From 77727ad50006fbbec0186de43ac51abad8ff64ac Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:08:11 +0200 Subject: [PATCH 3/6] Update tango theme --- novelwriter/assets/syntax/tango.conf | 29 +++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/novelwriter/assets/syntax/tango.conf b/novelwriter/assets/syntax/tango.conf index 12ad644b5..2ee5c3f57 100644 --- a/novelwriter/assets/syntax/tango.conf +++ b/novelwriter/assets/syntax/tango.conf @@ -2,24 +2,39 @@ name = Tango author = Veronica Berglyd Olsen (adaptation) +## +# Colours: +# Background = 30302f : 48, 48, 47 +# Foreground = eeeeec : 238, 238, 236 +# Comment = 8f8f8d : 143, 143, 141 +# Red = ef2929 : 239, 41, 41 +# Orange = c4a000 : 196, 160, 0 +# Yellow = fce94f : 252, 233, 79 +# Green = 8ae234 : 138, 226, 52 +# Cyan = 34e2e2 : 52, 226, 226 +# Blue = 3465a4 : 114, 159, 207 +# Purple = ad7fa8 : 173, 127, 168 +## + [Syntax] background = 48, 48, 47 text = 238, 238, 236 -link = 115, 159, 207 -headertext = 115, 159, 207 -headertag = 52, 101, 164 +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 note = 252, 242, 164 hidden = 143, 143, 141 -shortcode = 115, 159, 207 +shortcode = 114, 159, 207 keyword = 239, 41, 41 tag = 173, 127, 168 value = 239, 41, 41 -optional = 115, 159, 207 +optional = 114, 159, 207 spellcheckline = 239, 41, 41 errorline = 138, 226, 52 -replacetag = 51, 226, 226 -modifier = 196, 160, 0 +replacetag = 52, 226, 226 +modifier = 114, 159, 207 +texthighlight = 252, 233, 79, 96 From 2a50799873cc7d5318d347e0ea480eda08cf6519 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:08:25 +0200 Subject: [PATCH 4/6] Add dracula syntax and GUI theme --- novelwriter/assets/syntax/dracula.conf | 45 +++++++++++++++++++++++++ novelwriter/assets/themes/dracula.conf | 46 ++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 novelwriter/assets/syntax/dracula.conf create mode 100644 novelwriter/assets/themes/dracula.conf diff --git a/novelwriter/assets/syntax/dracula.conf b/novelwriter/assets/syntax/dracula.conf new file mode 100644 index 000000000..34180c0ed --- /dev/null +++ b/novelwriter/assets/syntax/dracula.conf @@ -0,0 +1,45 @@ +[Main] +name = Dracula +author = Veronica Berglyd Olsen (adaptation) +credit = Zeno Rocha +url = https://draculatheme.com +license = MIT +licenseurl = https://github.com/dracula/dracula-theme/blob/main/LICENSE + +## +# Colours: +# Background = 282a36 : 40, 42, 54 +# Foreground = f8f8f2 : 248, 248, 242 +# Comment = 6272a4 : 98, 114, 164 +# Cyan = 8be9fd : 139, 233, 253 +# Green = 50fa7b : 80, 250, 123 +# Orange = ffb86c : 255, 184, 108 +# Pink = ff79c6 : 255, 121, 198 +# Purple = bd93f9 : 189, 147, 249 +# Red = ff5555 : 255, 85, 85 +# Yellow = f1fa8c : 241, 250, 140 +## + +[Syntax] +# See: https://spec.draculatheme.com/ +background = 40, 42, 54 +text = 248, 248, 242 +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 +note = 255, 204, 233 +hidden = 98, 114, 164 +shortcode = 139, 233, 253 +keyword = 255, 121, 198 +tag = 255, 184, 108 +value = 255, 184, 108 +optional = 80, 250, 123 +spellcheckline = 255, 85, 85 +errorline = 80, 250, 123 +replacetag = 241, 250, 140 +modifier = 139, 233, 253 +texthighlight = 241, 250, 140, 96 diff --git a/novelwriter/assets/themes/dracula.conf b/novelwriter/assets/themes/dracula.conf new file mode 100644 index 000000000..8c2d2f9ef --- /dev/null +++ b/novelwriter/assets/themes/dracula.conf @@ -0,0 +1,46 @@ +[Main] +name = Dracula +description = A dark theme with bright colours +author = Veronica Berglyd Olsen (adaptation) +credit = Zeno Rocha +url = https://draculatheme.com +license = MIT +licenseurl = https://github.com/dracula/dracula-theme/blob/main/LICENSE +icontheme = typicons_dark + +## +# Colours: +# Background = 282a36 : 40, 42, 54 +# Foreground = f8f8f2 : 248, 248, 242 +# Current Line = 44475A : 68, 71, 90 +# Comment = 6272a4 : 98, 114, 164 +# Cyan = 8be9fd : 139, 233, 253 +# Green = 50fa7b : 80, 250, 123 +# Orange = ffb86c : 255, 184, 108 +# Pink = ff79c6 : 255, 121, 198 +# Purple = bd93f9 : 189, 147, 249 +# Red = ff5555 : 255, 85, 85 +# Yellow = f1fa8c : 241, 250, 140 +## + +[Palette] +window = 68, 71, 90 +windowtext = 248, 248, 242 +base = 40, 42, 54 +alternatebase = 51, 54, 69 +text = 248, 248, 242 +tooltipbase = 241, 250, 140 +tooltiptext = 40, 42, 54 +button = 80, 83, 105 +buttontext = 248, 248, 242 +brighttext = 68, 71, 90 +highlight = 166, 129, 218 +highlightedtext = 248, 248, 242 +link = 139, 233, 253 +linkvisited = 139, 233, 253 + +[GUI] +helptext = 204, 172, 249 +statusnone = 98, 114, 164 +statussaved = 80, 250, 123 +statusunsaved = 255, 85, 85 From afbe434b594f872319b5b0ff4fd0e638d2ad4a0f Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:26:37 +0200 Subject: [PATCH 5/6] Add Snazzy Light syntax theme --- novelwriter/assets/syntax/snazzy.conf | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 novelwriter/assets/syntax/snazzy.conf diff --git a/novelwriter/assets/syntax/snazzy.conf b/novelwriter/assets/syntax/snazzy.conf new file mode 100644 index 000000000..8f44fd434 --- /dev/null +++ b/novelwriter/assets/syntax/snazzy.conf @@ -0,0 +1,43 @@ +[Main] +name = Snazzy Light +author = Veronica Berglyd Olsen (adaptation) +credit = Florian Reuschel (color theme) +url = https://github.com/loilo/vscode-snazzy-light +license = MIT License +licenseurl = https://github.com/loilo/vscode-snazzy-light/blob/master/LICENSE + +## +# Colours: +# Background = fafbfc : 250, 251, 252 +# Foreground = 565869 : 86, 88, 105 +# Comment = 9194a2 : 145, 148, 162 +# Yellow = cf9c00 : 207, 156, 0 +# Red = ff5c57 : 255, 92, 87 +# Pink = f767bb : 247, 103, 187 +# Blue = 09a1ed : 9, 161, 237 +# Cyan = 13bbb7 : 19, 187, 183 +# Green = 2dae58 : 45, 174, 88 +## + +[Syntax] +background = 250, 251, 252 +text = 86, 88, 105 +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 +note = 120, 187, 185 +hidden = 145, 148, 162 +shortcode = 247, 103, 187 +keyword = 9, 161, 237 +tag = 45, 174, 88 +value = 9, 161, 237 +optional = 207, 156, 0 +spellcheckline = 255, 92, 87 +errorline = 45, 174, 88 +replacetag = 19, 187, 183 +modifier = 247, 103, 187 +texthighlight = 207, 156, 0, 96 From 2eabca8267c8f0850a6a4558e7b6b9939b511f64 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:34:28 +0200 Subject: [PATCH 6/6] Fix theme test --- tests/test_gui/test_gui_theme.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_gui/test_gui_theme.py b/tests/test_gui/test_gui_theme.py index 1402e309f..5c4cf3411 100644 --- a/tests/test_gui/test_gui_theme.py +++ b/tests/test_gui/test_gui_theme.py @@ -146,7 +146,7 @@ def testGuiTheme_Theme(qtbot, monkeypatch, nwGUI): assert themesList[0] == ("default_dark", "Default Dark Theme") assert themesList[1] == ("default_light", "Default Light Theme") assert themesList[2] == ("cyberpunk_night", "Cyberpunk Night") - assert themesList[3] == ("default", "Qt Default Theme") + assert themesList[3] == ("dracula", "Dracula") # A second call should returned the cached list assert mainTheme.listThemes() == mainTheme._themeList