Improved Dark theme, search bar and icon theme

This commit is contained in:
Xphalnos 2024-09-07 11:22:45 +02:00
parent 81f7c830be
commit 8f53d444ea
3 changed files with 18 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -8,13 +8,13 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) {
switch (theme) { switch (theme) {
case Theme::Dark: case Theme::Dark:
mw_searchbar->setStyleSheet("background-color: #1e1e1e; /* Dark background */" mw_searchbar->setStyleSheet("background-color: #1e1e1e;" // Dark background
"color: #ffffff; /* White text */" "color: #ffffff;" // White text
"border: 1px solid #ffffff; /* White border */" "border: 2px solid #ffffff;" // White border
"padding: 5px;"); "padding: 5px;");
themePalette.setColor(QPalette::Window, QColor(53, 53, 53)); themePalette.setColor(QPalette::Window, QColor(50, 50, 50));
themePalette.setColor(QPalette::WindowText, Qt::white); themePalette.setColor(QPalette::WindowText, Qt::white);
themePalette.setColor(QPalette::Base, QColor(25, 25, 25)); themePalette.setColor(QPalette::Base, QColor(20, 20, 20));
themePalette.setColor(QPalette::AlternateBase, QColor(25, 25, 25)); themePalette.setColor(QPalette::AlternateBase, QColor(25, 25, 25));
themePalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); themePalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
themePalette.setColor(QPalette::ToolTipBase, Qt::white); themePalette.setColor(QPalette::ToolTipBase, Qt::white);
@ -30,8 +30,9 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) {
break; break;
case Theme::Light: case Theme::Light:
mw_searchbar->setStyleSheet("background-color: #ffffff; /* Light gray background */" mw_searchbar->setStyleSheet("background-color: #ffffff;" // Light gray background
"color: #000000; /* Black text */" "color: #000000;" // Black text
"border: 2px solid #000000;" // Black border
"padding: 5px;"); "padding: 5px;");
themePalette.setColor(QPalette::Window, QColor(240, 240, 240)); // Light gray themePalette.setColor(QPalette::Window, QColor(240, 240, 240)); // Light gray
themePalette.setColor(QPalette::WindowText, Qt::black); // Black themePalette.setColor(QPalette::WindowText, Qt::black); // Black
@ -49,9 +50,9 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) {
break; break;
case Theme::Green: case Theme::Green:
mw_searchbar->setStyleSheet("background-color: #354535; /* Dark green background */" mw_searchbar->setStyleSheet("background-color: #1e1e1e;" // Dark background
"color: #ffffff; /* White text */" "color: #ffffff;" // White text
"border: 1px solid #ffffff; /* White border */" "border: 2px solid #ffffff;" // White border
"padding: 5px;"); "padding: 5px;");
themePalette.setColor(QPalette::Window, QColor(53, 69, 53)); // Dark green background themePalette.setColor(QPalette::Window, QColor(53, 69, 53)); // Dark green background
themePalette.setColor(QPalette::WindowText, Qt::white); // White text themePalette.setColor(QPalette::WindowText, Qt::white); // White text
@ -72,9 +73,9 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) {
break; break;
case Theme::Blue: case Theme::Blue:
mw_searchbar->setStyleSheet("background-color: #283c5a; /* Dark blue background */" mw_searchbar->setStyleSheet("background-color: #1e1e1e;" // Dark background
"color: #ffffff; /* White text */" "color: #ffffff;" // White text
"border: 1px solid #ffffff; /* White border */" "border: 2px solid #ffffff;" // White border
"padding: 5px;"); "padding: 5px;");
themePalette.setColor(QPalette::Window, QColor(40, 60, 90)); // Dark blue background themePalette.setColor(QPalette::Window, QColor(40, 60, 90)); // Dark blue background
themePalette.setColor(QPalette::WindowText, Qt::white); // White text themePalette.setColor(QPalette::WindowText, Qt::white); // White text
@ -95,9 +96,9 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) {
break; break;
case Theme::Violet: case Theme::Violet:
mw_searchbar->setStyleSheet("background-color: #643278; /* Violet background */" mw_searchbar->setStyleSheet("background-color: #1e1e1e;" // Dark background
"color: #ffffff; /* White text */" "color: #ffffff;" // White text
"border: 1px solid #ffffff; /* White border */" "border: 2px solid #ffffff;" // White border
"padding: 5px;"); "padding: 5px;");
themePalette.setColor(QPalette::Window, QColor(100, 50, 120)); // Violet background themePalette.setColor(QPalette::Window, QColor(100, 50, 120)); // Violet background
themePalette.setColor(QPalette::WindowText, Qt::white); // White text themePalette.setColor(QPalette::WindowText, Qt::white); // White text

View File

@ -267,8 +267,8 @@ public:
menuView->addAction(menuGame_List_Mode->menuAction()); menuView->addAction(menuGame_List_Mode->menuAction());
menuView->addAction(menuGame_List_Icons->menuAction()); menuView->addAction(menuGame_List_Icons->menuAction());
menuView->addAction(menuThemes->menuAction()); menuView->addAction(menuThemes->menuAction());
menuThemes->addAction(setThemeLight);
menuThemes->addAction(setThemeDark); menuThemes->addAction(setThemeDark);
menuThemes->addAction(setThemeLight);
menuThemes->addAction(setThemeGreen); menuThemes->addAction(setThemeGreen);
menuThemes->addAction(setThemeBlue); menuThemes->addAction(setThemeBlue);
menuThemes->addAction(setThemeViolet); menuThemes->addAction(setThemeViolet);