https://bugs.kde.org/show_bug.cgi?id=479712
Bug ID: 479712 Summary: Plasma 6's SNI implementation doesn't respect the IconThemePath property Classification: Plasma Product: plasmashell Version: 5.92.0 Platform: Compiled Sources OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: System Tray Assignee: plasma-b...@kde.org Reporter: bizy...@zoho.com CC: mate...@gmail.com Target Milestone: 1.0 SUMMARY Due to some changes in Plasma 6 or KF6, apps that rely on the `IconThemePath` property of StatusNotifierItems can no longer display their logo in the system tray. I've dumped the details of my investigation below, as I don't now how to fix the issue correctly myself. STEPS TO REPRODUCE Launch JetBrains Toolbox in a Plasma 6 session. OBSERVED RESULT A placeholder icon is displayed in Plasma's system tray. EXPECTED RESULT The JetBrains Toolbox logo is displayed. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20240111 KDE Plasma Version: 6.0.80 KDE Frameworks Version: 5.249.0 Qt Version: 6.6.1 Kernel Version: 6.6.10-1-default (64-bit) Graphics Platform: Wayland ADDITIONAL INFORMATION • Here: https://invent.kde.org/plasma/plasma-workspace/-/blob/201436dda62f46d70df120cd113bf3eaefff1116/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml#L35 — the icon theme path is lost, this name is only tried against the systemwide icon theme. • The QIcon has the correct image because it is loaded with a configured KIconLoader: https://invent.kde.org/plasma/plasma-workspace/-/blob/201436dda62f46d70df120cd113bf3eaefff1116/applets/systemtray/statusnotifieritemsource.cpp#L250-275 • But because loading icons by name is prioritized over QIcons, it's not used. To solve this properly, Kirigami.Icon would need to be configured to look at `model.IconThemePath`, but it currently has no "themePath" property. To add it, this function would need to accept a list of paths or a KIconLoader, then pass it on to KDE::icon (where the latter is already an optional argument): https://invent.kde.org/frameworks/qqc2-desktop-style/-/blob/3f5d157c923ad8eca85b592e80531703fafd47e3/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp#L248 But it's an override, the declaration is in Kirigami, and Kirigami does not depend on KIconThemes, so KIconLoader is probably not an option. On the other hand, if we pass paths, we'd have to create a KIconLoader from them every time, which is probably too expensive (I think every KIconLoader creates its own cache). A hack would be: ``` return model.IconName.length > 0 && model.IconThemePath.length == 0 ? model.IconName : model.Icon ``` — but it would not solve the issue completely because a) monochrome icon coloring would be broken for such icons, and b) I think overlay icons are currently also broken because overlaying is also implemented with QIcons on the C++ side. Fun fact: there's a DataEngine that contains a full duplicate of the above code as https://invent.kde.org/plasma/plasma-workspace/-/blob/master/dataengines/statusnotifieritem/statusnotifieritemsource.cpp?ref_type=heads. -- You are receiving this mail because: You are watching all bug changes.