From 072d0f0acdd5f6f583f9b96d37556186e91fb94a Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:40:58 +0200 Subject: [PATCH] Merge and update the default themes --- novelwriter/assets/syntax/default_dark.conf | 42 --------- novelwriter/assets/syntax/default_light.conf | 42 --------- novelwriter/assets/themes/default_dark.conf | 90 ++++++++++++-------- novelwriter/assets/themes/default_light.conf | 90 ++++++++++++-------- novelwriter/gui/theme.py | 2 +- 5 files changed, 113 insertions(+), 153 deletions(-) delete mode 100644 novelwriter/assets/syntax/default_dark.conf delete mode 100644 novelwriter/assets/syntax/default_light.conf diff --git a/novelwriter/assets/syntax/default_dark.conf b/novelwriter/assets/syntax/default_dark.conf deleted file mode 100644 index 8e467189..00000000 --- a/novelwriter/assets/syntax/default_dark.conf +++ /dev/null @@ -1,42 +0,0 @@ -[Main] -name = Default Dark -author = Veronica Berglyd Olsen -credit = Veronica Berglyd Olsen -url = https://github.com/vkbo/novelWriter -license = CC BY-SA 4.0 -licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ - -## -# Colours: -# Background = 2a2a2a : 42, 42, 42 -# Foreground = cccccc : 204, 204, 204 -# Comment = 969696 : 150, 150, 150 -# Red = e64250 : 230, 66, 80 -# Orange = f99157 : 249, 145, 87 -# Yellow = ffff84 : 255, 255, 132 -# Green = 99cc99 : 153, 204, 153 -# Blue = 288ed7 : 102, 153, 204 -# Purple = 8c56d7 : 140, 86, 215 -## - -[Syntax] -background = 42, 42, 42 -text = 204, 204, 204 -link = 102, 153, 204 -headertext = 153, 204, 153 -headertag = 153, 204, 153, 160 -emphasis = 249, 145, 87 -dialog = 102, 153, 204 -altdialog = 102, 153, 204 -note = 255, 255, 216 -hidden = 150, 150, 150 -shortcode = 153, 204, 153 -keyword = 230, 66, 80 -tag = 153, 204, 153 -value = 102, 153, 204 -optional = 153, 204, 153 -spellcheckline = 230, 66, 80 -errorline = 153, 204, 153 -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 deleted file mode 100644 index 2e5ae404..00000000 --- a/novelwriter/assets/syntax/default_light.conf +++ /dev/null @@ -1,42 +0,0 @@ -[Main] -name = Default Light -author = Veronica Berglyd Olsen -credit = Veronica Berglyd Olsen -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 = 0, 100, 0, 160 -emphasis = 174, 110, 30 -dialog = 0, 0, 200 -altdialog = 0, 0, 200 -note = 100, 100, 0 -hidden = 100, 100, 100 -shortcode = 0, 100, 0 -keyword = 200, 50, 50 -tag = 0, 100, 0 -value = 0, 0, 200 -optional = 0, 100, 0 -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/themes/default_dark.conf b/novelwriter/assets/themes/default_dark.conf index 6ccf6ede..a8e6a3de 100644 --- a/novelwriter/assets/themes/default_dark.conf +++ b/novelwriter/assets/themes/default_dark.conf @@ -8,43 +8,65 @@ url = https://github.com/vkbo/novelWriter license = CC BY-SA 4.0 licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ -[Icons] -default = 184, 184, 184 -faded = 148, 148, 148 -red = 242, 119, 122 -orange = 249, 145, 57 -yellow = 255, 204, 102 -green = 153, 204, 153 -aqua = 102, 204, 204 -blue = 102, 153, 204 -purple = 204, 153, 204 +[Base] +default = #cccccc +faded = #949494 +red = #f2777a +orange = #f99139 +yellow = #ffcc66 +green = #99cc99 +aqua = #66cccc +blue = #6699cc +purple = #cc99cc [Project] -root = 102, 153, 204 -folder = 255, 204, 102 -file = 184, 184, 184 -title = 153, 204, 153 -chapter = 242, 119, 122 -scene = 102, 153, 204 -note = 255, 204, 102 +root = blue +folder = yellow +file = default +title = green +chapter = red +scene = blue +note = yellow [Palette] -window = 54, 54, 54 -windowtext = 204, 204, 204 -base = 62, 62, 62 -alternatebase = 78, 78, 78 -text = 204, 204, 204 -tooltipbase = 255, 255, 192 -tooltiptext = 21, 21, 13 -button = 62, 62, 62 -buttontext = 204, 204, 204 -brighttext = 62, 62, 62 -highlight = 44, 152, 247 -highlightedtext = 255, 255, 255 -link = 102, 153, 204 -linkvisited = 102, 153, 204 +window = #363636 +windowtext = default +base = #3e3e3e +alternatebase = #4e4e4e +text = default +tooltipbase = #ffffc0 +tooltiptext = #15150d +button = #3e3e3e +buttontext = default +brighttext = #3e3e3e +highlight = #2c98f7 +highlightedtext = #ffffff +link = blue +linkvisited = blue [GUI] -helptext = 164, 164, 164 -fadedtext = 148, 148, 148 -errortext = 255, 164, 164 +helptext = #a4a4a4 +fadedtext = #949494 +errortext = red + +[Syntax] +background = #363636 +text = default +link = blue +headertext = green +headertag = green, 160 +emphasis = orange +dialog = blue +altdialog = blue +note = yellow +hidden = faded +shortcode = green +keyword = red +tag = green +value = blue +optional = green +spellcheckline = red +errorline = green +replacetag = green +modifier = green +texthighlight = yellow, 72 diff --git a/novelwriter/assets/themes/default_light.conf b/novelwriter/assets/themes/default_light.conf index f236f404..c4496d13 100644 --- a/novelwriter/assets/themes/default_light.conf +++ b/novelwriter/assets/themes/default_light.conf @@ -8,43 +8,65 @@ url = https://github.com/vkbo/novelWriter license = CC BY-SA 4.0 licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ -[Icons] -default = 72, 72, 72 -faded = 108, 108, 108 -red = 240, 40, 41 -orange = 245, 135, 31 -yellow = 234, 183, 0 -green = 113, 140, 0 -aqua = 62, 153, 159 -blue = 66, 113, 174 -purple = 137, 89, 168 +[Base] +default = #303030 +faded = #6c6c6c +red = #a62a2d +orange = #b36829 +yellow = #a68542 +green = #296629 +aqua = #269999 +blue = #3a70a6 +purple = #b35ab3 [Project] -root = 66, 113, 174 -folder = 234, 183, 0 -file = 72, 72, 72 -title = 113, 140, 0 -chapter = 240, 40, 41 -scene = 66, 113, 174 -note = 234, 183, 0 +root = blue +folder = yellow +file = default +title = green +chapter = red +scene = blue +note = yellow [Palette] -window = 239, 239, 239 -windowtext = 0, 0, 0 -base = 255, 255, 255 -alternatebase = 224, 224, 224 -text = 0, 0, 0 -tooltipbase = 255, 255, 220 -tooltiptext = 0, 0, 0 -button = 239, 239, 239 -buttontext = 0, 0, 0 -brighttext = 255, 255, 255 -highlight = 48, 135, 198 -highlightedtext = 255, 255, 255 -link = 66, 113, 174 -linkvisited = 66, 113, 174 +window = #efefef +windowtext = #000000 +base = #ffffff +alternatebase = #e0e0e0 +text = #000000 +tooltipbase = #ffffdc +tooltiptext = #000000 +button = #efefef +buttontext = #000000 +brighttext = #ffffff +highlight = #3087c6 +highlightedtext = #ffffff +link = blue +linkvisited = blue [GUI] -helptext = 92, 92, 92 -fadedtext = 108, 108, 108 -errortext = 255, 92, 92 +helptext = #5c5c5c +fadedtext = #6c6c6c +errortext = red + +[Syntax] +background = #ffffff +text = #000000 +link = blue +headertext = green +headertag = green, 160 +emphasis = orange +dialog = blue +altdialog = blue +note = yellow +hidden = faded +shortcode = green +keyword = red +tag = green +value = blue +optional = green +spellcheckline = red +errorline = green +replacetag = green +modifier = green +texthighlight = #c8c80060 diff --git a/novelwriter/gui/theme.py b/novelwriter/gui/theme.py index 437531a3..4a53f453 100644 --- a/novelwriter/gui/theme.py +++ b/novelwriter/gui/theme.py @@ -244,7 +244,7 @@ class GuiTheme: entries = len(data) if entries == 2: # Assume name, alpha - color = self._qColors.get(data[0].strip(), default) + color = QColor(self._qColors.get(data[0].strip(), default)) color.setAlpha(checkInt(data[1], 255)) return color else: