summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-10-01 13:45:26 +0000
committerGitHub <noreply@github.com>2022-10-01 13:45:26 +0000
commitf8724fdea800dc36ac164c998f914f4e5122a289 (patch)
treec8fb5a98c0cf002788e671d805f8f3a24709f493 /src
parentFix linting (diff)
parentAdd green theme color, make "error" configurable (diff)
downloadnheko-f8724fdea800dc36ac164c998f914f4e5122a289.tar.xz
Merge pull request #1198 from rnhmjoj/pr-green
Add green theme color, make "error" configurable
Diffstat (limited to 'src')
-rw-r--r--src/ui/Theme.cpp6
-rw-r--r--src/ui/Theme.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/Theme.cpp b/src/ui/Theme.cpp
index f3bd5b78..e6290adf 100644
--- a/src/ui/Theme.cpp
+++ b/src/ui/Theme.cpp
@@ -69,16 +69,22 @@ Theme::Theme(QStringView theme)
         sidebarBackground_ = QColor(0x23, 0x36, 0x49);
         alternateButton_   = QColor(0xcc, 0xcc, 0xcc);
         red_               = QColor(0xa8, 0x23, 0x53);
+        green_             = QColor("green");
         orange_            = QColor(0xfc, 0xbe, 0x05);
+        error_             = QColor("#dd3d3d");
     } else if (theme == u"dark") {
         sidebarBackground_ = QColor(0x2d, 0x31, 0x39);
         alternateButton_   = QColor(0x41, 0x4A, 0x59);
         red_               = QColor(0xa8, 0x23, 0x53);
+        green_             = QColor("green");
         orange_            = QColor(0xfc, 0xc5, 0x3a);
+        error_             = QColor("#dd3d3d");
     } else {
         sidebarBackground_ = p.window().color();
         alternateButton_   = p.dark().color();
         red_               = QColor(Qt::GlobalColor::red);
+        green_             = QColor("green");
         orange_            = QColor(0xff, 0xa5, 0x00); // SVG orange
+        error_             = QColor("#dd3d3d");
     }
 }
diff --git a/src/ui/Theme.h b/src/ui/Theme.h
index 2c85c61e..94c89fc5 100644
--- a/src/ui/Theme.h
+++ b/src/ui/Theme.h
@@ -15,6 +15,7 @@ class Theme : public QPalette
     Q_PROPERTY(QColor alternateButton READ alternateButton CONSTANT)
     Q_PROPERTY(QColor separator READ separator CONSTANT)
     Q_PROPERTY(QColor red READ red CONSTANT)
+    Q_PROPERTY(QColor green READ green CONSTANT)
     Q_PROPERTY(QColor error READ error CONSTANT)
     Q_PROPERTY(QColor orange READ orange CONSTANT)
 public:
@@ -26,9 +27,10 @@ public:
     QColor alternateButton() const { return alternateButton_; }
     QColor separator() const { return separator_; }
     QColor red() const { return red_; }
-    QColor error() const { return QColor(0xdd, 0x3d, 0x3d); }
+    QColor green() const { return green_; }
+    QColor error() const { return error_; }
     QColor orange() const { return orange_; }
 
 private:
-    QColor sidebarBackground_, separator_, red_, orange_, alternateButton_;
+    QColor sidebarBackground_, separator_, red_, green_, error_, orange_, alternateButton_;
 };