Bug 432962 - When an icon isn't found in the Plasma theme and it falls back to the icon theme, it can't fall back again to the icon theme's fallback theme
Summary: When an icon isn't found in the Plasma theme and it falls back to the icon th...
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: 5.79.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
: 439962 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-15 08:40 UTC by Alex
Modified: 2023-08-01 03:41 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
The notification icon, when DnD modus is NOT enabled (797 bytes, image/png)
2021-02-15 14:46 UTC, Alex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2021-02-15 08:40:47 UTC
When I activate DnD mode for notifications, the bell icon disappears, probably due to a missing icon in the theme.
Comment 1 Nate Graham 2021-02-15 14:40:17 UTC
Which icon theme are you using? Can you attach a screenshot showing the issue?
Comment 2 Alex 2021-02-15 14:46:08 UTC
Created attachment 135699 [details]
The notification icon, when DnD modus is NOT enabled
Comment 3 Nate Graham 2021-02-15 14:47:19 UTC
Thanks. And what icon theme are you using?
Comment 4 Alex 2021-02-15 14:47:35 UTC
I am actually using the Oxygen icon theme, but the last time I reported a bug about the monochrome tray icons, it was reassigned to the Breeze theme.
Comment 5 Nate Graham 2021-02-15 14:52:17 UTC
Aha, thanks. So what should happen is that Oxygen falls back to Breeze. It looks like that's happening for the regular icon. But I wonder why it's not happening for the DnD icon? Can you switch your Plasma theme to Breeze temporarily and see if that fixes it? Tray icons actually come from the Plasma theme, if possible.
Comment 6 Alex 2021-02-15 15:00:37 UTC
With Breeze I see the icon in DnD mode. And I see it in the notification pane, where it was missing as well.

With Oxygen, HighContrast and Adwaita I do not see it.
With Flatery-Blue (some thirdparty theme) I see the Breeze icon.

With Adwaita the buttons in buttons, like "apply", do not have icons either.
I am not sure if the theme configures that there are no icons on the buttons or if the fallback is not working for the buttons, too.
Comment 7 Alex 2021-02-15 15:02:14 UTC
Sorry, I changed the Icon theme. And not the plasma theme.

Now I did not change the icon theme, but the plasma theme (so I have icons=oxygen, plasma=breeze) and the icon is missing again.
Comment 8 Nate Graham 2021-02-15 16:31:33 UTC
Okay, I understand what's going on here now.

When you use the Oxygen Plasma theme, the notifications applet asks for the notifications-disabled icon, which isn't present in the Plasma theme. No problem; it falls back to the icon theme. But since your icon theme is Oxygen, that also doesn't have the notifications-disabled icon in it!

At this point it's stuck and no icon is found. That's why when you use the Breeze icon theme it works: it's falling back to the icon theme which has that icon in it.

But there is a real bug here: when it falls back to Oxygen and doesn't find the icon, it isn't capable of falling back once more to Breeze to find the icon, which is the fallback specified in the Oxygen icon theme. This fallback from one icon theme to another works when an app asks for an icon directly from the icon theme, but not when Plasma asks for an icon from the Plasma theme and then it falls back to the icon theme. It should fall back a second time, but doesn't.

In the meantime, if either the Oxygen icon or Plasma theme gains an Oxygen-style version of this icon, it will be fixed for you.
Comment 9 Alex 2021-02-15 16:39:56 UTC
My usual plasma theme is Aya and I guess it may have less maintenance than Breeze and Oxygen.
A fallback to a safe default (should it be breeze or should there be some fallback icon provided by plasma itself without any theme?) would be nice.
Comment 10 Nate Graham 2021-02-15 17:08:50 UTC
That could work too: first fall back to the icon in the Breeze plasma theme, and if nothing is found, fall back to the active icon theme.

Personally I think we should remove icons from Plasma themes entirely in KF6 and only have icons in the icon theme. This would be way less confusing to users and prevent bugs like this automatically.
Comment 11 Nate Graham 2021-08-03 16:57:14 UTC
*** Bug 439962 has been marked as a duplicate of this bug. ***
Comment 12 doncbugs 2021-10-09 05:25:21 UTC
(In reply to Nate Graham from comment #10)

> Personally I think we should remove icons from Plasma themes entirely in KF6
> and only have icons in the icon theme. This would be way less confusing to
> users and prevent bugs like this automatically.

As long as this allows distinct icons for the plasma style, this should be acceptable. Oxygen and Air are the styles that come to mind. Rules for the style would have to be much stricter since the line between icon and widget is fuzzy at best. Of course, the task of making a theme would become much more daunting from the current smaller set of assets.
Comment 13 Nate Graham 2023-08-01 03:41:43 UTC
This problem is being "solved" by being made no longer possible to happen at all in Plasma 6. This is because in Plasma 6, icons in the Plasma theme will no longer be used; all icons will come from the icon theme.

If there is still a valid case for using different icons but only in Plasma, we can re-add that feature by having KIconLoader load icons from a completely different theme for Plasma.

See https://invent.kde.org/plasma/plasma-desktop/-/issues/82.