From 10d0d20bf0d546fc04ffaad8406311171ab935b7 Mon Sep 17 00:00:00 2001 From: KamFretoZ <14798312+kamfretoz@users.noreply.github.com> Date: Fri, 14 Mar 2025 22:22:30 +0700 Subject: [PATCH] FSUI: Add Dark Ruby theme --- src/core/fullscreen_ui.cpp | 4 ++-- .../interfacesettingswidget.cpp | 12 +++++----- src/duckstation-qt/qtthemes.cpp | 2 ++ src/util/imgui_fullscreen.cpp | 23 +++++++++++++++++++ 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index 36f41e818..100edb966 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -480,10 +480,10 @@ 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("Purple Rain")}; + 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", "PurpleRain"}; + "CobaltSky", "GreyMatter", "PinkyPals", "DarkRuby", "PurpleRain"}; ////////////////////////////////////////////////////////////////////////// // State diff --git a/src/duckstation-qt/interfacesettingswidget.cpp b/src/duckstation-qt/interfacesettingswidget.cpp index cef612f11..0f6bbf888 100644 --- a/src/duckstation-qt/interfacesettingswidget.cpp +++ b/src/duckstation-qt/interfacesettingswidget.cpp @@ -17,10 +17,10 @@ const char* InterfaceSettingsWidget::THEME_NAMES[] = { QT_TRANSLATE_NOOP("MainWindow", "Fusion"), QT_TRANSLATE_NOOP("MainWindow", "Dark Fusion (Gray)"), QT_TRANSLATE_NOOP("MainWindow", "Dark Fusion (Blue)"), - QT_TRANSLATE_NOOP("MainWindow", "Cobalt Sky"), - QT_TRANSLATE_NOOP("MainWindow", "Pinky Pals"), - QT_TRANSLATE_NOOP("MainWindow", "Grey Matter"), QT_TRANSLATE_NOOP("MainWindow", "AMOLED"), + QT_TRANSLATE_NOOP("MainWindow", "Cobalt Sky"), + QT_TRANSLATE_NOOP("MainWindow", "Grey Matter"), + QT_TRANSLATE_NOOP("MainWindow", "Pinky Pals"), QT_TRANSLATE_NOOP("MainWindow", "Dark Ruby"), QT_TRANSLATE_NOOP("MainWindow", "Purple Rain"), QT_TRANSLATE_NOOP("MainWindow", "QDarkStyle"), @@ -35,10 +35,10 @@ const char* InterfaceSettingsWidget::THEME_VALUES[] = { "fusion", "darkfusion", "darkfusionblue", - "cobaltsky", - "pinkypals", - "greymatter", "AMOLED", + "cobaltsky", + "greymatter", + "pinkypals", "darkruby", "purplerain", "qdarkstyle", diff --git a/src/duckstation-qt/qtthemes.cpp b/src/duckstation-qt/qtthemes.cpp index 9fe7a57ab..d08507df1 100644 --- a/src/duckstation-qt/qtthemes.cpp +++ b/src/duckstation-qt/qtthemes.cpp @@ -375,6 +375,8 @@ const char* Host::GetDefaultFullscreenUITheme() return "PinkyPals"; else if (theme == "purplerain") return "PurpleRain"; + else if (theme == "darkruby") + return "DarkRuby"; else if (theme == "AMOLED") return "AMOLED"; else if (theme == "windowsvista") diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index a60402b86..8d79544ee 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -3527,6 +3527,29 @@ void ImGuiFullscreen::SetTheme(std::string_view theme) UIStyle.ToastTextColor = HEX_TO_IMVEC4(0xffffff, 0xff); UIStyle.ShadowColor = IM_COL32(100, 100, 100, 50); } + else if (theme == "DarkRuby") + { + UIStyle.BackgroundColor = HEX_TO_IMVEC4(0x1b1b1b, 0xff); + UIStyle.BackgroundTextColor = HEX_TO_IMVEC4(0xffffff, 0xff); + UIStyle.BackgroundLineColor = HEX_TO_IMVEC4(0xf0f0f0, 0xff); + UIStyle.BackgroundHighlight = HEX_TO_IMVEC4(0xab2720, 0xff); + UIStyle.PopupFrameBackgroundColor = HEX_TO_IMVEC4(0x313131, 0xf2); + UIStyle.PopupBackgroundColor = HEX_TO_IMVEC4(0x212121, 0xf2); + UIStyle.PrimaryColor = HEX_TO_IMVEC4(0x121212, 0xff); + UIStyle.PrimaryLightColor = HEX_TO_IMVEC4(0xb5b5b5, 0xff); + UIStyle.PrimaryDarkColor = HEX_TO_IMVEC4(0x000000, 0xff); + UIStyle.PrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff); + UIStyle.DisabledColor = HEX_TO_IMVEC4(0x8d8d8d, 0xff); + UIStyle.TextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff); + UIStyle.PrimaryLineColor = HEX_TO_IMVEC4(0xffffff, 0xff); + UIStyle.SecondaryColor = HEX_TO_IMVEC4(0x969696, 0xff); + UIStyle.SecondaryStrongColor = HEX_TO_IMVEC4(0xdc143c, 0xff); + UIStyle.SecondaryWeakColor = HEX_TO_IMVEC4(0x2a2e36, 0xff); + UIStyle.SecondaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff); + UIStyle.ToastBackgroundColor = HEX_TO_IMVEC4(0x282828, 0xff); + UIStyle.ToastTextColor = HEX_TO_IMVEC4(0xffffff, 0xff); + UIStyle.ShadowColor = IM_COL32(0, 0, 0, 100); + } else if (theme == "PurpleRain") { UIStyle.BackgroundColor = HEX_TO_IMVEC4(0x341d56, 0xff);