2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #8190 from Docteh/palswap

ui: Set Link Color when setting theme
This commit is contained in:
bunnei 2022-04-13 22:15:31 -07:00 committed by GitHub
commit 8ae43a1be9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View file

@ -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);
}

View file

@ -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

View file

@ -17,6 +17,8 @@
namespace UISettings {
bool IsDarkTheme();
struct ContextualShortcut {
QString keyseq;
QString controller_keyseq;