From fce18689b7787c6db721fde8dc6e0ebf0cc1c4d0 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 11 Jan 2025 00:56:16 +0100 Subject: [PATCH] Add a faded icon colour --- novelwriter/assets/themes/cyberpunk_night.conf | 1 + novelwriter/assets/themes/default_dark.conf | 1 + novelwriter/assets/themes/default_light.conf | 1 + novelwriter/assets/themes/dracula.conf | 1 + novelwriter/assets/themes/solarized_dark.conf | 1 + novelwriter/assets/themes/solarized_light.conf | 1 + novelwriter/core/item.py | 2 +- novelwriter/gui/itemdetails.py | 2 +- novelwriter/gui/theme.py | 3 +++ 9 files changed, 11 insertions(+), 2 deletions(-) diff --git a/novelwriter/assets/themes/cyberpunk_night.conf b/novelwriter/assets/themes/cyberpunk_night.conf index 143e1f20..50059c96 100644 --- a/novelwriter/assets/themes/cyberpunk_night.conf +++ b/novelwriter/assets/themes/cyberpunk_night.conf @@ -8,6 +8,7 @@ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ [Icons] default = 150, 150, 150 +faded = 97, 97, 97 red = 242, 72, 23 orange = 255, 150, 10 yellow = 255, 255, 0 diff --git a/novelwriter/assets/themes/default_dark.conf b/novelwriter/assets/themes/default_dark.conf index 39b5369c..e5e57d6b 100644 --- a/novelwriter/assets/themes/default_dark.conf +++ b/novelwriter/assets/themes/default_dark.conf @@ -9,6 +9,7 @@ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ [Icons] default = 204, 204, 204 +faded = 148, 148, 148 red = 242, 119, 122 orange = 249, 145, 57 yellow = 255, 204, 102 diff --git a/novelwriter/assets/themes/default_light.conf b/novelwriter/assets/themes/default_light.conf index c52d1d3c..dba5fc94 100644 --- a/novelwriter/assets/themes/default_light.conf +++ b/novelwriter/assets/themes/default_light.conf @@ -9,6 +9,7 @@ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/ [Icons] default = 77, 77, 76 +faded = 108, 108, 108 red = 240, 40, 41 orange = 245, 135, 31 yellow = 234, 183, 0 diff --git a/novelwriter/assets/themes/dracula.conf b/novelwriter/assets/themes/dracula.conf index d874e832..849f3294 100644 --- a/novelwriter/assets/themes/dracula.conf +++ b/novelwriter/assets/themes/dracula.conf @@ -24,6 +24,7 @@ licenseurl = https://github.com/dracula/dracula-theme/blob/main/LICENSE [Icons] default = 248, 248, 242 +faded = 98, 114, 164 red = 255, 85, 85 orange = 255, 184, 108 yellow = 241, 250, 140 diff --git a/novelwriter/assets/themes/solarized_dark.conf b/novelwriter/assets/themes/solarized_dark.conf index 7bcc1073..25a5e32d 100644 --- a/novelwriter/assets/themes/solarized_dark.conf +++ b/novelwriter/assets/themes/solarized_dark.conf @@ -8,6 +8,7 @@ licenseurl = https://github.com/altercation/solarized/blob/master/LICENSE [Icons] default = 253, 246, 227 +faded = 166, 161, 149 red = 220, 50, 47 orange = 203, 75, 22 yellow = 181, 137, 0 diff --git a/novelwriter/assets/themes/solarized_light.conf b/novelwriter/assets/themes/solarized_light.conf index 6cf7c7d6..805fbd5f 100644 --- a/novelwriter/assets/themes/solarized_light.conf +++ b/novelwriter/assets/themes/solarized_light.conf @@ -8,6 +8,7 @@ licenseurl = https://github.com/altercation/solarized/blob/master/LICENSE [Icons] default = 0, 43, 54 +faded = 78, 91, 95 red = 220, 50, 47 orange = 203, 75, 22 yellow = 181, 137, 0 diff --git a/novelwriter/core/item.py b/novelwriter/core/item.py index 5ed0417e..6cf0ec90 100644 --- a/novelwriter/core/item.py +++ b/novelwriter/core/item.py @@ -355,7 +355,7 @@ class NWItem: icon = SHARED.theme.getIcon(key, color) else: text = "" - icon = SHARED.theme.getIcon("noncheckable") + icon = SHARED.theme.getIcon("noncheckable", "faded") return text, icon ## diff --git a/novelwriter/gui/itemdetails.py b/novelwriter/gui/itemdetails.py index d77e4f2c..d6435bdf 100644 --- a/novelwriter/gui/itemdetails.py +++ b/novelwriter/gui/itemdetails.py @@ -241,7 +241,7 @@ class GuiItemDetails(QWidget): else: self.labelIcon.setPixmap(SHARED.theme.getPixmap("unchecked", (iPx, iPx), "red")) else: - self.labelIcon.setPixmap(SHARED.theme.getPixmap("noncheckable", (iPx, iPx))) + self.labelIcon.setPixmap(SHARED.theme.getPixmap("noncheckable", (iPx, iPx), "faded")) self.labelData.setText(elide(nwItem.itemName, 100)) diff --git a/novelwriter/gui/theme.py b/novelwriter/gui/theme.py index 17e3b55a..6fd4f198 100644 --- a/novelwriter/gui/theme.py +++ b/novelwriter/gui/theme.py @@ -252,6 +252,7 @@ class GuiTheme: sec = "Icons" if parser.has_section(sec): self.iconCache.setIconColor("default", self._parseColour(parser, sec, "default")) + self.iconCache.setIconColor("faded", self._parseColour(parser, sec, "faded")) self.iconCache.setIconColor("red", self._parseColour(parser, sec, "red")) self.iconCache.setIconColor("orange", self._parseColour(parser, sec, "orange")) self.iconCache.setIconColor("yellow", self._parseColour(parser, sec, "yellow")) @@ -544,10 +545,12 @@ class GuiIcons: """Clear the icon cache.""" text = QApplication.palette().windowText().color() default = text.name(QColor.NameFormat.HexRgb).encode("utf-8") + faded = self.mainTheme.fadedText.name(QColor.NameFormat.HexRgb).encode("utf-8") self._svgData = {} self._svgColours = { "default": default, + "faded": faded, "red": b"#ff0000", "orange": b"#ff7f00", "yellow": b"#ffff00",