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)

This commit is contained in:
Kovid Goyal 2026-01-31 09:16:28 +05:30
parent e61e1c3c91
commit 172f5de1e3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

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