Skip to content
Snippets Groups Projects
Unverified Commit 8ae43a1b authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #8190 from Docteh/palswap

ui: Set Link Color when setting theme
parents 46da380b f6695814
No related branches found
No related tags found
No related merge requests found
...@@ -3652,6 +3652,14 @@ void GMainWindow::UpdateUITheme() { ...@@ -3652,6 +3652,14 @@ void GMainWindow::UpdateUITheme() {
setStyleSheet({}); 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::setThemeName(current_theme);
QIcon::setThemeSearchPaths(theme_paths); QIcon::setThemeSearchPaths(theme_paths);
} }
......
...@@ -15,6 +15,14 @@ const Themes themes{{ ...@@ -15,6 +15,14 @@ const Themes themes{{
{"Midnight Blue Colorful", "colorful_midnight_blue"}, {"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 = {}; Values values = {};
} // namespace UISettings } // namespace UISettings
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
namespace UISettings { namespace UISettings {
bool IsDarkTheme();
struct ContextualShortcut { struct ContextualShortcut {
QString keyseq; QString keyseq;
QString controller_keyseq; QString controller_keyseq;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment