From 4a99dbc7ee30bb8839f4cf09a96c668db784b869 Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Mon, 2 Jun 2025 18:20:48 +0100 Subject: [PATCH] Qt: Add workaround for incorrectly tinted icons after theme switch --- pcsx2-qt/Themes.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcsx2-qt/Themes.cpp b/pcsx2-qt/Themes.cpp index ca8b4e9b85..0f85de7ac7 100644 --- a/pcsx2-qt/Themes.cpp +++ b/pcsx2-qt/Themes.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -43,6 +44,12 @@ void QtHost::UpdateApplicationTheme() SetStyleFromSettings(); SetIconThemeFromStyle(); + + // Qt generates tinted versions of icons and stores them in QPixmapCache + // The key used does not seem to include the theme (or tint colour). + // This can cause icons tinted for wrong theme to be used for selected/disabled. + // As a workaround, reset the pixmap cache to clear icons tinted for the old theme. + QPixmapCache::clear(); } bool QtHost::IsDarkApplicationTheme()