From f7d63bc30b2adbf420163d8a8825e1ee9e125498 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 15 Jul 2021 00:37:14 +0200 Subject: [PATCH] Theme::currentThemeHasImage should not return true if parent themes match BUG: 439847 --- src/plasma/theme.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plasma/theme.cpp b/src/plasma/theme.cpp index 025e61f56..fabf98f4e 100644 --- a/src/plasma/theme.cpp +++ b/src/plasma/theme.cpp @@ -243,7 +243,11 @@ bool Theme::currentThemeHasImage(const QString &name) const return false; } - return !d->findInTheme(name % QLatin1String(".svgz"), d->themeName).isEmpty() || !d->findInTheme(name % QLatin1String(".svg"), d->themeName).isEmpty(); + QString path = d->findInTheme(name % QLatin1String(".svgz"), d->themeName); + if (path.isEmpty()) { + path = d->findInTheme(name % QLatin1String(".svg"), d->themeName); + } + return path.contains(QLatin1String("/" PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % d->themeName); } KSharedConfigPtr Theme::colorScheme() const