Bug 445804 - Obeying icon themes' fallback icon themes causes inconsistent icons
Summary: Obeying icon themes' fallback icon themes causes inconsistent icons
Status: REOPENED
Alias: None
Product: frameworks-kiconthemes
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.96.0
Platform: Arch Linux Linux
: VHI normal
Target Milestone: ---
Assignee: Carl Schwan
URL:
Keywords: regression
: 445811 447092 447378 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-11-20 11:59 UTC by firewalker
Modified: 2023-10-31 11:04 UTC (History)
15 users (show)

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


Attachments
Wrong icons sourrounded in red (512.36 KB, image/jpeg)
2021-11-26 13:51 UTC, Jerzy Witwinowski
Details
I confirm that frameworks 5.89 does not solve the bug (450.28 KB, image/png)
2021-12-18 20:13 UTC, Jerzy Witwinowski
Details
Buggy icons (left) and correct icons (right) (570.26 KB, image/png)
2021-12-20 08:12 UTC, Jerzy Witwinowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description firewalker 2021-11-20 11:59:51 UTC
When upgrading to kiconthemes 5.88.0 my icons are messed up. Icon changes with no consistency. Icons that doesn't mach my theme (oxygen).

E.g. https://i.imgur.com/kXwj8Sg.png

The first icon is different from the others. xlsx files also changed to something else.  Reverting to version 5.87.0, fixes the inconsistencies.


Operating System: Arch Linux
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.2-arch1-1 (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2021-11-23 23:29:27 UTC
To fix this, did you revert just kiconthemes, or breeze-icons too, or all frameworks?
Comment 2 Nate Graham 2021-11-24 04:00:05 UTC
*** Bug 445811 has been marked as a duplicate of this bug. ***
Comment 3 firewalker 2021-11-24 06:37:09 UTC
(In reply to Nate Graham from comment #1)
> To fix this, did you revert just kiconthemes, or breeze-icons too, or all
> frameworks?

Just kiconthemes. I think the following commit causes the issue. I will test it and report back.

https://github.com/KDE/kiconthemes/commit/de3a1abb1839136322f32f2782f9592280b2bbd3
Comment 4 Nate Graham 2021-11-24 19:56:43 UTC
Thanks, that's very helpful. Can confirm. I've left a comment at https://invent.kde.org/frameworks/kiconthemes/-/merge_requests/45
Comment 5 Bug Janitor Service 2021-11-25 19:51:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kiconthemes/-/merge_requests/49
Comment 6 Jerzy Witwinowski 2021-11-26 13:51:29 UTC
Created attachment 143966 [details]
Wrong icons sourrounded in red

I have exactly the same problem on KDE Neon after the updates I've done on the last Saturday (as shown on the attached file).
Comment 7 Nicolas Fella 2021-12-03 11:28:21 UTC
Git commit 13181b03eac3c85f0649d5399d8c3037c388928c by Nicolas Fella, on behalf of Jan Blackquill.
Committed on 03/12/2021 at 11:20.
Pushed by nicolasfella into branch 'master'.

KIconLoader: prefer icons from current theme before falling back to other themes

M  +25   -0    autotests/kiconloader_unittest.cpp
M  +7    -27   src/kiconloader.cpp

https://invent.kde.org/frameworks/kiconthemes/commit/13181b03eac3c85f0649d5399d8c3037c388928c
Comment 8 William 2021-12-04 15:03:58 UTC
Can this be related to the fact that in plasma 5.23 my icons do not respect the themes "inherits=hicolor, breeze" path anymore?

for example the icon for Steam used to come from the hicolor theme (where steam installed it) before as it is the first in the inherits chain, now it comes from the breeze theme... (it even comes from breeze theme if it is completly removed from the inherits)
Idk if this belongs here but shouldnt that be considered undesired behaviour? i want my inherits chain to work as before and not use breeze icons when they are available in hicolor...
Comment 9 Nate Graham 2021-12-04 15:08:10 UTC
Please don't re-open the bug unless you've verified that the fix in Frameworks 5.89 isn't working for you.

Also, that issue seems like it could be unrelated. Is your icon theme set to Breeze? If so, then what you're describing is behaving as intended; the system will pull icons from your chosen icon theme before that icon's fallback theme or hicolor.
Comment 10 William 2021-12-04 15:20:19 UTC
sry didnt mean to cause confusion: i created a new ticket here: https://bugs.kde.org/show_bug.cgi?id=446477
Comment 11 firewalker 2021-12-18 07:35:29 UTC
5.89. doesn't fix it for me. The only way to fix it is for me to remove the line 

addThemeByName(QIcon::fallbackThemeName(), appname);

from kiconloader.cpp and rebuild.
Comment 12 Jerzy Witwinowski 2021-12-18 20:13:20 UTC
Created attachment 144662 [details]
I confirm that frameworks 5.89 does not solve the bug
Comment 13 Carl Schwan 2021-12-19 16:19:43 UTC
I don't think this should be considered as a bug. Before that change, we were ignoring the fact that many apps and framework were setting a fallback icon theme and now we are just obeying this fallback instead of returning an empty icon.

The issue here is that apps have no way to communicate when not showing an icon is fine or when it will breaks (e.g. icon only buttons). And I'm not sure this is fixable.
Comment 14 firewalker 2021-12-19 16:51:38 UTC
It isn't like there isn't an icon for the application to choose from and doesn;t show anything. Maybe something else is forcing the app to choose the fallback theme instead the next relative icon? Application that comes with their own icons will choose something else. E.g. Clementine. 

Will choose
/usr/share/icons/breeze/apps/48/application-x-clementine.svg

Instead of 
/usr/share/icons/hicolor/64x64/apps/org.clementine_player.Clementine.png
Comment 15 Jerzy Witwinowski 2021-12-20 08:12:36 UTC
Created attachment 144706 [details]
Buggy icons (left) and correct icons (right)

@ Carl Schwan - I can't agree... Until a few weeks ago we had a consistent icon theme (and on the computers using older version of frameworks, we still do, as you can see on the right panel of my attachment, a screenshot I took on my laptop running under Kubuntu)... Now we don't have (as you can see on the left panel of my attachment, my desktop PC running under KDE Neon; the icon changes are marked with red arrows)... It's definitely a bug, or at least a horrible regression... And apparently all it takes to fix it is changing one line of the code...
Comment 16 Nate Graham 2021-12-27 23:24:04 UTC
*** Bug 447378 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2022-01-08 16:16:41 UTC
*** Bug 447092 has been marked as a duplicate of this bug. ***
Comment 18 Konrad Materka 2022-01-14 12:34:25 UTC
Bug 448248 - possibly a duplicate

qBittorent provides "qbittorrent-tray-light", "qbittorrent-tray-dark", "qbittorrent-tray" and "qbittorrent". Breeze provides only "qbittorrent", but it is enforced in all cases, even if app or desktop entry have other one configured (like qbittorrent-tray-dark).
Comment 19 Fabian Vogt 2022-02-04 12:10:32 UTC
It's not entirely clear to me which of the reported issues are about the original bug or a regression caused by 13181b03eac3c85f0649d5399d8c3037c388928c.

(In reply to Konrad Materka from comment #18)
> Bug 448248 - possibly a duplicate
> 
> qBittorent provides "qbittorrent-tray-light", "qbittorrent-tray-dark",
> "qbittorrent-tray" and "qbittorrent". Breeze provides only "qbittorrent",
> but it is enforced in all cases, even if app or desktop entry have other one
> configured (like qbittorrent-tray-dark).

This is definitely an effect of 13181b03eac3c85f0649d5399d8c3037c388928c.

In openSUSE we also have negative effects of this: https://bugzilla.opensuse.org/show_bug.cgi?id=1195551
Package patterns have icons like "pattern-kde-devel", but with this change applied those fall back to "pattern.svg" provided by breeze as the "generic" variant. FWICT, this is in accordance to https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-0.8.html#guidelines, but apparently many icons were not named with this in mind.
Comment 20 Komorebi 2022-02-08 15:25:53 UTC
I just want to mention that bug https://bugs.kde.org/show_bug.cgi?id=447092 is marked as duplicate of this one, but I'm not sure if they're really related. 
Anyway I want to highlight that google chrome web application icons are still broken
Comment 21 Jerzy Witwinowski 2022-02-13 05:23:23 UTC
With the last update (frameworks 5.90) it's getting much better, but still not perfect... I have recovered correct icons for Models (a directory in the home folder), recent places (in the Discover sidebar), the system drive (in the Discover sidebar), MP3 files, but XLSX files for example still have a wrong Breeze icon (the same for the application launchers for all the apps in the LibreOffice suite)...  There is also a weird Breeze icon for "sort by" button in Discover.
Comment 22 firewalker 2022-03-24 18:52:46 UTC Comment hidden (spam)
Comment 23 firewalker 2022-04-16 08:58:46 UTC Comment hidden (spam)
Comment 24 firewalker 2022-05-21 17:00:56 UTC Comment hidden (spam)
Comment 25 firewalker 2022-06-17 15:07:13 UTC Comment hidden (spam)
Comment 26 firewalker 2022-07-16 15:16:44 UTC Comment hidden (spam)
Comment 27 firewalker 2022-09-17 10:14:25 UTC Comment hidden (spam)
Comment 28 firewalker 2022-10-15 13:33:01 UTC Comment hidden (spam)
Comment 29 firewalker 2022-11-20 12:33:21 UTC Comment hidden (spam)
Comment 30 Jerzy Witwinowski 2022-11-20 21:14:36 UTC Comment hidden (spam)
Comment 31 firewalker 2022-12-17 20:21:29 UTC
Still present in 5.101.0