Bug 420246

Summary: icon theme change mucks up icon resolution
Product: [Frameworks and Libraries] frameworks-kiconthemes Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: Christoph Feck <cfeck>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs-null, nate, sitter
Priority: NOR Keywords: triaged
Version First Reported In: 5.68.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screen recording

Description Patrick Silva 2020-04-18 12:57:26 UTC
Created attachment 127639 [details]
screen recording

STEPS TO REPRODUCE
1. open system settings > global theme and set another global theme
2. click on "System Information" in the side bar
3. 

OBSERVED RESULT
We see a generic KDE icon instead of the distribution icon (Neon unstable in my case). The distribution icon appears after I re-open system settings > system information. Watch the attached screen recoring please.

EXPECTED RESULT
distribution icon sohuld be correcly updated immediately after we set another global theme.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.1
Comment 1 Nate Graham 2020-04-20 19:20:22 UTC
Cannot reproduce on openSUSE Tumbleweed; the distro logo does not change. In fact the distro logo is not supposed to change at all, AFAIK.
Comment 2 Harald Sitter 2020-04-21 10:14:34 UTC
A distro can set the logo as either absolute path (which is likely what opensuse does) OR icon name (which gets resolved via the theme to support scaling). Neon does the latter which is why it *can* change. What the recording shows is unexpected change though.

There is something broken somewhere lower in the stack. If you look at the recording, the first time the KCM is opened it has the logo start-here-kde while on neon it should be start-here-kde-neon (which is part of hicolor and thus always available). So it should *always* be a neonishy icon and the fact that it is not points at something being wrong with caches somewhere either in KIconLoader or QIcon. Or perhaps hicolor is lost as fallback theme along the way?

To reproduce simply put some start-here-kde-foo icon in your hicolor theme and set LOGO=start-here-kde-foo in /etc/os-release (+ ensure there's no kcm-about-distrorc anywhere setting an override logo) and check sys info KCM now shows that foo icon.

Then look at the these two cases:

- opens system settings
- change icon theme
- go to sys info
- observe it now being start-here-kde

next

- open system settings
- **go to sys info**
- it will be start-here-kde-foo
- change icon theme
- go to sys info again
- the icon will still be start-here-kde-foo!

the only difference between these two scenarios is the icon resolution possibly getting cached in the second scenario and therefore resolution continues to work as expected the second time.

All KCM instances are thrown away once you go to another KCM, so this isn't a KCM-side issue, from a KCM POV the icon is loaded every time from scratch.

Moving bug to kiconthemes as closes possible culprit.
Comment 3 Patrick Silva 2021-09-19 20:16:49 UTC
I'm unable to reproduce this bug on neon unstable.
However, I'm not sure if the issue described by Harald is fixed or distro logo of neon unstable is now set as absolute path.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 4 Harald Sitter 2021-09-20 09:51:07 UTC
(In reply to Patrick Silva from comment #3)
> I'm unable to reproduce this bug on neon unstable.
> However, I'm not sure if the issue described by Harald is fixed or distro
> logo of neon unstable is now set as absolute path.

Neon hasn't changed anything there. If you can't reproduce it with the steps I've outlined it has probably been fixed in the meantime.
Comment 5 Patrick Silva 2021-09-20 12:19:31 UTC
Thank you Harald. Closing as fixed.