Qt/BPM: Add Green Giant Theme (#3390)

WHAT ARE YE DOING IN MY SWAMP???
This commit is contained in:
KamFretoZ 2025-03-20 18:16:45 +07:00 committed by GitHub
parent a1d69982f3
commit e5cec05633
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 64 additions and 3 deletions

View File

@ -488,10 +488,11 @@ static constexpr const std::array s_ps_button_mapping{
static constexpr std::array s_theme_names = {
FSUI_NSTR("Automatic"), FSUI_NSTR("Dark"), FSUI_NSTR("Light"),
FSUI_NSTR("AMOLED"), FSUI_NSTR("Cobalt Sky"), FSUI_NSTR("Grey Matter"),
FSUI_NSTR("Pinky Pals"), FSUI_NSTR("Dark Ruby"), FSUI_NSTR("Purple Rain")};
FSUI_NSTR("Green Giant"), FSUI_NSTR("Pinky Pals"), FSUI_NSTR("Dark Ruby"),
FSUI_NSTR("Purple Rain")};
static constexpr std::array s_theme_values = {"", "Dark", "Light", "AMOLED", "CobaltSky",
"GreyMatter", "PinkyPals", "DarkRuby", "PurpleRain"};
"GreyMatter", "GreenGiant", "PinkyPals", "DarkRuby", "PurpleRain"};
//////////////////////////////////////////////////////////////////////////
// State

View File

@ -20,6 +20,7 @@ const char* InterfaceSettingsWidget::THEME_NAMES[] = {
QT_TRANSLATE_NOOP("MainWindow", "AMOLED"),
QT_TRANSLATE_NOOP("MainWindow", "Cobalt Sky"),
QT_TRANSLATE_NOOP("MainWindow", "Grey Matter"),
QT_TRANSLATE_NOOP("MainWindow", "Green Giant"),
QT_TRANSLATE_NOOP("MainWindow", "Pinky Pals"),
QT_TRANSLATE_NOOP("MainWindow", "Dark Ruby"),
QT_TRANSLATE_NOOP("MainWindow", "Purple Rain"),
@ -38,6 +39,7 @@ const char* InterfaceSettingsWidget::THEME_VALUES[] = {
"AMOLED",
"cobaltsky",
"greymatter",
"greengiant",
"pinkypals",
"darkruby",
"purplerain",

View File

@ -202,6 +202,40 @@ void QtHost::SetStyleFromSettings()
qApp->setPalette(darkPalette);
qApp->setStyleSheet(QString());
}
else if (theme == "greengiant")
{
// Custom palette by RedDevilus, Tame (Light/Washed out) Green as main color and Grayish Blue as complimentary.
// Alternative white theme.
qApp->setStyle(QStyleFactory::create("Fusion"));
const QColor black(25, 25, 25);
const QColor gray(111, 111, 111);
const QColor limerick(176, 196, 0);
const QColor brown(135, 100, 50);
const QColor pear(213, 222, 46);
QPalette greenGiantPalette;
greenGiantPalette.setColor(QPalette::Window, pear);
greenGiantPalette.setColor(QPalette::WindowText, black);
greenGiantPalette.setColor(QPalette::Base, limerick);
greenGiantPalette.setColor(QPalette::AlternateBase, brown.lighter());
greenGiantPalette.setColor(QPalette::ToolTipBase, brown);
greenGiantPalette.setColor(QPalette::ToolTipText, Qt::white);
greenGiantPalette.setColor(QPalette::Text, black);
greenGiantPalette.setColor(QPalette::Button, brown.lighter());
greenGiantPalette.setColor(QPalette::ButtonText, black.lighter());
greenGiantPalette.setColor(QPalette::Link, brown.lighter());
greenGiantPalette.setColor(QPalette::Highlight, brown);
greenGiantPalette.setColor(QPalette::HighlightedText, Qt::white);
greenGiantPalette.setColor(QPalette::Disabled, QPalette::ButtonText, gray);
greenGiantPalette.setColor(QPalette::Disabled, QPalette::WindowText, gray.darker());
greenGiantPalette.setColor(QPalette::Disabled, QPalette::Text, gray.darker());
greenGiantPalette.setColor(QPalette::Disabled, QPalette::Light, gray);
qApp->setPalette(greenGiantPalette);
qApp->setStyleSheet(QString());
}
else if (theme == "pinkypals")
{
qApp->setStyle(QStyleFactory::create("Fusion"));
@ -371,6 +405,8 @@ const char* Host::GetDefaultFullscreenUITheme()
return "CobaltSky";
else if (theme == "greymatter")
return "GreyMatter";
else if (theme == "greengiant")
return "GreenGiant";
else if (theme == "pinkypals")
return "PinkyPals";
else if (theme == "purplerain")

View File

@ -3618,6 +3618,28 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
UIStyle.SecondaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UIStyle.ToastBackgroundColor = HEX_TO_IMVEC4(0xd86a66, 0xff);
UIStyle.ToastTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UIStyle.ShadowColor = IM_COL32(100, 100, 100, 50);
}
else if (theme == "GreenGiant")
{
UIStyle.BackgroundColor = HEX_TO_IMVEC4(0xB0C400, 0xff);
UIStyle.BackgroundTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UIStyle.BackgroundLineColor = HEX_TO_IMVEC4(0xf0f0f0, 0xff);
UIStyle.BackgroundHighlight = HEX_TO_IMVEC4(0x876433, 0xff);
UIStyle.PopupBackgroundColor = HEX_TO_IMVEC4(0xB0C400, 0xf2);
UIStyle.PrimaryColor = HEX_TO_IMVEC4(0xD5DE2E, 0xff);
UIStyle.PrimaryLightColor = HEX_TO_IMVEC4(0x795A2D, 0xff);
UIStyle.PrimaryDarkColor = HEX_TO_IMVEC4(0x523213, 0xff);
UIStyle.PrimaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UIStyle.DisabledColor = HEX_TO_IMVEC4(0x878269, 0xff);
UIStyle.TextHighlightColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UIStyle.PrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff);
UIStyle.SecondaryColor = HEX_TO_IMVEC4(0x523213, 0xff);
UIStyle.SecondaryStrongColor = HEX_TO_IMVEC4(0x523213, 0xff);
UIStyle.SecondaryWeakColor = HEX_TO_IMVEC4(0x523213, 0xff);
UIStyle.SecondaryTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UIStyle.ToastBackgroundColor = HEX_TO_IMVEC4(0xD5DE2E, 0xff);
UIStyle.ToastTextColor = HEX_TO_IMVEC4(0x000000, 0xff);
UIStyle.ShadowColor = IM_COL32(100, 100, 100, 50);
}
else if (theme == "DarkRuby")