Skip to content

RFC: [KIconLoader] Prefer icon with the same name

hexchain requested to merge (removed):prefer-icons-same-name into master

Currently, if an icon isn't immediately available in a theme, KIconLoader tries to chop off every dash-delimited part from the icon name until there is one with the name. It only considers other icon themes if none is found. This isn't always an optimal strategy.

Consider the following case:

  • The Papirus theme contains a chrome icon.
  • Chrome creates desktop files for installed PWAs (e.g. on https://pokedex.org there is an "install" button to the right of the address bar) with names like chrome-abcdefghijklmnopqrst-Default and puts their icons with the same name into ~/.local/share/icons/hicolor.
  • When the Papirus theme is in use, PWAs in the kickoff menu will always have the standard chrome icon.

In this patch, KIconLoader is made to try all themes and only alters the name if none of them contains the icon.

I did not find any rationale behind the present fallback logic, hence the RFC status. Please enlighten me if I missed anything.

Merge request reports