Comment 3 for bug 1853768

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

When an icon is missing (e.g. document-open), Qt first falls back to splitting the name by dashes and taking the first part of it (document). Only then it falls back to parent icon themes (Yaru → Humanity). So for all document-* icons it uses document.png from MimeTypes context.

Doing it vice versa would fix the bug. However, the specification explicitly tells us to behave as Qt currently does: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#guidelines

> if the more specific item does not exist in the current theme, and does exist in a parent theme, the generic icon from the current theme is preferred, in order to keep consistent style.

Another potential fix would be ignoring the MimeTypes context. The specification says that fallback happens “for all contexts other than MimeTypes”. However currently Qt’s icon loader does not take contexts into account at all. So fixing it in Qt would be difficult.

I have just pinged the Yaru theme maintainer, let’s hope the fix from Yaru will land in Ubuntu soon.