From 35b15fdd485106195dcc4c994a3f17adf3c0ad6e Mon Sep 17 00:00:00 2001 From: Auxy6858 <71662994+Auxy6858@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:21:36 +0100 Subject: [PATCH] Jelly + ice cream theme (#486) * Update config_window.cpp * Update config_window.hpp * Rename theme to Cream * Rename theme to cream harder --------- Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> --- include/panda_qt/config_window.hpp | 3 ++- src/panda_qt/config_window.cpp | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/include/panda_qt/config_window.hpp b/include/panda_qt/config_window.hpp index e91936c4..4a523879 100644 --- a/include/panda_qt/config_window.hpp +++ b/include/panda_qt/config_window.hpp @@ -16,6 +16,7 @@ class ConfigWindow : public QDialog { Light = 1, Dark = 2, GreetingsCat = 3, + Cream = 4, }; Theme currentTheme; @@ -26,4 +27,4 @@ class ConfigWindow : public QDialog { public: ConfigWindow(QWidget* parent = nullptr); ~ConfigWindow(); -}; \ No newline at end of file +}; diff --git a/src/panda_qt/config_window.cpp b/src/panda_qt/config_window.cpp index 44debc32..75293742 100644 --- a/src/panda_qt/config_window.cpp +++ b/src/panda_qt/config_window.cpp @@ -10,6 +10,7 @@ ConfigWindow::ConfigWindow(QWidget* parent) : QDialog(parent) { themeSelect->addItem(tr("Light")); themeSelect->addItem(tr("Dark")); themeSelect->addItem(tr("Greetings Cat")); + themeSelect->addItem(tr("Cream")); themeSelect->setCurrentIndex(static_cast(currentTheme)); themeSelect->setGeometry(40, 40, 100, 50); @@ -87,6 +88,28 @@ void ConfigWindow::setTheme(Theme theme) { break; } + case Theme::Cream: { + QApplication::setStyle(QStyleFactory::create("Fusion")); + + QPalette p; + p.setColor(QPalette::Window, QColor(255, 229, 180)); + p.setColor(QPalette::WindowText, QColor(33, 37, 41)); + p.setColor(QPalette::Base, QColor(255, 229, 180)); + p.setColor(QPalette::AlternateBase, QColor(255, 229, 180)); + p.setColor(QPalette::ToolTipBase, QColor(33, 37, 41)); + p.setColor(QPalette::ToolTipText, QColor(33, 37, 41)); + p.setColor(QPalette::Text, QColor(33, 37, 41)); + p.setColor(QPalette::Button, QColor(255, 229, 180)); + p.setColor(QPalette::ButtonText, QColor(33, 37, 41)); + p.setColor(QPalette::BrightText, QColor(217, 113, 103)); + p.setColor(QPalette::Link, QColor(248, 148, 150)); + + p.setColor(QPalette::Highlight, QColor(217, 113, 103)); + p.setColor(QPalette::HighlightedText, QColor(63, 33, 29)); + qApp->setPalette(p); + break; + } + case Theme::System: { qApp->setPalette(this->style()->standardPalette()); qApp->setStyle(QStyleFactory::create("WindowsVista")); @@ -96,4 +119,4 @@ void ConfigWindow::setTheme(Theme theme) { } } -ConfigWindow::~ConfigWindow() { delete themeSelect; } \ No newline at end of file +ConfigWindow::~ConfigWindow() { delete themeSelect; }