Bug 471250

Summary: KIconLoader ignores the icon set's higher-priority hicolor Inherit and uses Breeze before hicolor
Product: [Frameworks and Libraries] frameworks-kiconthemes Reporter: The Feren OS Dev <ferenosdev>
Component: generalAssignee: Christoph Feck <cfeck>
Status: CONFIRMED ---    
Severity: normal CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.107.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description The Feren OS Dev 2023-06-20 02:23:08 UTC
SUMMARY
Rather than respecting the Inherits value of the currently applied icon set, KIconLoader appears to use icons from Breeze before it considers hicolor for icons, which causes side-effects such as icon sets who do not want to theme 3rd-party icons theming 3rd-party icons anyway in KDE Applications and Plasma.

STEPS TO REPRODUCE
1. Have an icon set that does not theme certain icons, such as LibreOffice's icons, and give it an Inherits such as Inherits=gnome,hicolor,breeze
2. Apply it

OBSERVED RESULT
Breeze icons are used for those unthemed icons, instead of hicolor ones

EXPECTED RESULT
hicolor would theme those icons, while Breeze would only theme icons both hicolor and the test-case icon set lack

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE neon 5.27.5
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
This may be because of the code order seen at https://invent.kde.org/frameworks/kiconthemes/-/blob/master/src/kiconloader.cpp?ref_type=heads#L492 , as well as https://invent.kde.org/frameworks/kiconthemes/-/blob/master/src/kiconloader.cpp?ref_type=heads#L501

If this is the case, I think we should make an exception for if Breeze is not present in the Inherits, or has lower priority than hicolor in Inherits, that gives Breeze lower priority than hicolor as the icon spec might not account for Breeze itself being a fallback in the same vain as hicolor is in this context.
Comment 1 Nate Graham 2023-09-14 21:36:56 UTC
Wanna submit a patch?
Comment 2 The Feren OS Dev 2023-09-17 01:39:15 UTC
(In reply to Nate Graham from comment #1)
> Wanna submit a patch?

A patch is on my todo list once I have released Feren OS 2023.11, for sure.