Bug 430602 - Icon fallback logic should include icons in fallback themes, not just the current theme
Summary: Icon fallback logic should include icons in fallback themes, not just the cur...
Status: CONFIRMED
Alias: None
Product: frameworks-kiconthemes
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-19 23:47 UTC by CatKiller
Modified: 2021-12-22 19:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot of volume widget (84.39 KB, image/png)
2020-12-28 00:22 UTC, CatKiller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CatKiller 2020-12-19 23:47:55 UTC
When using a USB sound card, which get the device.icon_name "audio-card-usb", applications that should show an icon for the device, such as volume widgets, show the icon-missing icon instead of an appropriate icon, because audio-card-usb is missing from Breeze.

For a similar reason, the icon set could probably do with a link from audio-card to audio-card-pci.
Comment 1 Nate Graham 2020-12-27 17:10:23 UTC
Due to the fallback mechanics in QIcon, if an app asks for "audio-card-usb" and no such icon is available, it will automatically look for "audio-card", and we do have such an icon. Are you seeing this not happening? Can you show a screenshot that displays the wrong appearance?
Comment 2 CatKiller 2020-12-28 00:22:59 UTC
Created attachment 134355 [details]
screenshot of volume widget

So, as it turns out, it _isn't_ a problem with the Breeze theme as I'd thought. I incorrectly surmised that I was getting the missing-icon icon because the icon was missing, and because creating the icon made the problem go away. Hence the bug report, since Breeze doesn't have the audio-card-usb icon. But you are correct that selecting the Breeze icon theme and logging out/logging in displays the audio-card fallback icon correctly.

The problem I experienced is caused by the way that Inherited themes are stepped through. The theme I'd picked (Suru) doesn't have an audio-card-usb icon (because none of the themes do). Nor does it have audio-card. So that fallback doesn't work, and it looks through the Inherited themes. Crucially, though, none of the Inherited themes have audio-card-usb and it _doesn't_ look for audio-card in those themes as an alternative, so it displays the missing-icon icon instead. Picking a theme in the Inherits chain that has audio-card (Humanity, in this case) and giving it audio-card-usb by symlinking fixed the problem.

So Breeze doesn't necessarily need an audio-card-usb icon (although it might be worthwhile if you happen to have a nice design) but the fallback mechanism ought to also check for the fallback icons in the Inherits chain.
Comment 3 Nate Graham 2020-12-28 00:43:43 UTC
That might be nice. Moving to kiconthemes for now since I think that's where the needed changes would have to be made.