aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-04-13 22:15:31 -0700
committerGitHub <noreply@github.com>2022-04-13 22:15:31 -0700
commitdadffca1b8a69bb4f6c44692f25c2aa319dc482e (patch)
tree9292316010f234bb492fcec47fcfd104e882be5f /src
parentac9467fa6c0b96b11558e0d87bc410c71a8c585f (diff)
parentfeb462c6541488598e761335389c39a9a51454b6 (diff)
Merge pull request #8190 from Docteh/palswap
ui: Set Link Color when setting theme
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp8
-rw-r--r--src/yuzu/uisettings.cpp8
-rw-r--r--src/yuzu/uisettings.h2
3 files changed, 18 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 62d15f8cd3..52879a989d 100644
--- 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 21683576c1..f683b80f74 100644
--- 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 cc5aee3823..15ba9ea17a 100644
--- 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;