From 876f1f42e0c9d4136fb73a5264e6088f31e40639 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Thu, 14 Apr 2022 08:12:41 +0200 Subject: [PATCH] early-access version 2677 --- README.md | 2 +- src/yuzu/main.cpp | 8 ++++++++ src/yuzu/uisettings.cpp | 8 ++++++++ src/yuzu/uisettings.h | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66ee39cee..d2dd7b086 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2676. +This is the source code for early-access 2677. ## Legal Notice diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 62d15f8cd..52879a989 100755 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3652,6 +3652,14 @@ void GMainWindow::UpdateUITheme() { setStyleSheet({}); } + QPalette new_pal(qApp->palette()); + if (UISettings::IsDarkTheme()) { + new_pal.setColor(QPalette::Link, QColor(0, 190, 255, 255)); + } else { + new_pal.setColor(QPalette::Link, QColor(0, 140, 200, 255)); + } + qApp->setPalette(new_pal); + QIcon::setThemeName(current_theme); QIcon::setThemeSearchPaths(theme_paths); } diff --git a/src/yuzu/uisettings.cpp b/src/yuzu/uisettings.cpp index 21683576c..f683b80f7 100755 --- a/src/yuzu/uisettings.cpp +++ b/src/yuzu/uisettings.cpp @@ -15,6 +15,14 @@ const Themes themes{{ {"Midnight Blue Colorful", "colorful_midnight_blue"}, }}; +bool IsDarkTheme() { + const auto& theme = UISettings::values.theme; + return theme == QStringLiteral("qdarkstyle") || + theme == QStringLiteral("qdarkstyle_midnight_blue") || + theme == QStringLiteral("colorful_dark") || + theme == QStringLiteral("colorful_midnight_blue"); +} + Values values = {}; } // namespace UISettings diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h index cc5aee382..15ba9ea17 100755 --- a/src/yuzu/uisettings.h +++ b/src/yuzu/uisettings.h @@ -17,6 +17,8 @@ namespace UISettings { +bool IsDarkTheme(); + struct ContextualShortcut { QString keyseq; QString controller_keyseq;