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>
This commit is contained in:
Auxy6858 2024-04-01 23:21:36 +01:00 committed by GitHub
parent 3b9490e633
commit 35b15fdd48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 2 deletions

View file

@ -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();
};
};

View file

@ -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<int>(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; }
ConfigWindow::~ConfigWindow() { delete themeSelect; }