From 172f5de1e3d5d6cb5bfc8c97fc17a1a4dcfd4ace Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 31 Jan 2026 09:16:28 +0530 Subject: [PATCH] Fi a regression in calibre 9 that broke using icon themes in "For dark and light" mode. Fixes #2139454 [San Fracisco icon theme not working after calibre 9.0 update](https://bugs.launchpad.net/calibre/+bug/2139454) --- .../gui2/progress_indicator/CalibreIconEngine.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/progress_indicator/CalibreIconEngine.cpp b/src/calibre/gui2/progress_indicator/CalibreIconEngine.cpp index eb39b6b5c2..53a40f02e2 100644 --- a/src/calibre/gui2/progress_indicator/CalibreIconEngine.cpp +++ b/src/calibre/gui2/progress_indicator/CalibreIconEngine.cpp @@ -421,11 +421,17 @@ class CalibreIconEngine : public QIconEngine { used_theme_key.store(current_theme_key.load()); if (theme.using_dark_colors) { if (theme.has_dark_user_theme && try_with_key("calibre-user-dark"_L1)) return; - if (theme.has_any_user_theme && try_with_key("calibre-user-any"_L1)) return; + if (theme.has_any_user_theme) { + if (try_with_key("calibre-user-any-dark"_L1)) return; + if (try_with_key("calibre-user-any"_L1)) return; + } if (try_with_key("calibre-default-dark"_L1)) return; } else { if (theme.has_light_user_theme && try_with_key("calibre-user-light"_L1)) return; - if (theme.has_any_user_theme && try_with_key("calibre-user-any"_L1)) return; + if (theme.has_any_user_theme) { + if (try_with_key("calibre-user-any-light"_L1)) return; + if (try_with_key("calibre-user-any"_L1)) return; + } if (try_with_key("calibre-default-light"_L1)) return; } if (try_with_key("calibre-default"_L1)) return;