Summary: | Some icons drawn by Kirigami.icon don't highlight when "active" property is set to true | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kirigami | Reporter: | thegrandfinale2001 |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | materka, nate, nicolas.fella, notmart |
Priority: | NOR | ||
Version First Reported In: | 6.10.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kirigami/-/commit/4142c2b7e7252ee1a2ae4d8aa51970d9457a692e | Version Fixed In: | 6.16 |
Sentry Crash Report: | |||
Attachments: | System Tray Highlighting |
Description
thegrandfinale2001
2025-01-11 14:54:26 UTC
Which ones don't? Also what color scheme are you using? Vor a visual issue like this, a screen recording would be helpful. Created attachment 177339 [details]
System Tray Highlighting
I go through a few apps and some have highlighting and some do not.
(In reply to Nate Graham from comment #1) > Which ones don't? > > Also what color scheme are you using? > > Vor a visual issue like this, a screen recording would be helpful. I'm using default Breeze color scheme. Also I should specify that KDE app tray icons all highlight, it's random when it comes to non KDE apps. Wow, that's a lot of system tray icons. Let me look through the code to see if I can figure out the case where no highlighting happens. As far as I can tell, the system tray is doing everything right: it's setting Kirigami.Icon's "active" property on hover, as evidenced by the fact that *some* of your 3rd-party tray icons are honoring it. The only option I can see here is that for some of those icons, Kirigami.Icon's "active" state doesn't produce any visual changes for whatever reason. It looks like it's simply engaging the QIcon::Active mode in QIcon code itself, so it's possible this is also a Qt issue. Regardless, moving to Kirigami for further investigation. (In reply to Nate Graham from comment #5) > As far as I can tell, the system tray is doing everything right: it's > setting Kirigami.Icon's "active" property on hover, as evidenced by the fact > that *some* of your 3rd-party tray icons are honoring it. > > The only option I can see here is that for some of those icons, > Kirigami.Icon's "active" state doesn't produce any visual changes for > whatever reason. It looks like it's simply engaging the QIcon::Active mode > in QIcon code itself, so it's possible this is also a Qt issue. > > Regardless, moving to Kirigami for further investigation. Thanks for taking a look!! (In reply to Nate Graham from comment #5) > As far as I can tell, the system tray is doing everything right: it's > setting Kirigami.Icon's "active" property on hover, as evidenced by the fact > that *some* of your 3rd-party tray icons are honoring it. > > The only option I can see here is that for some of those icons, > Kirigami.Icon's "active" state doesn't produce any visual changes for > whatever reason. It looks like it's simply engaging the QIcon::Active mode > in QIcon code itself, so it's possible this is also a Qt issue. > > Regardless, moving to Kirigami for further investigation. The difference seems to be between icons provided by name and icons provided as a pixmap. For example Strawberry provides a pixmap and that doesn't get a visible active effect. When Kirigami.Icon gets a pixmap it loads that into an image (https://invent.kde.org/frameworks/kirigami/-/blob/master/src/primitives/icon.cpp?ref_type=heads#L362) and more or less directly renders that, without applying any mode. I tried to change that by first creating a QIcon from the pixmap and then obtaining a pixmap with the right mode from that. That ends up in https://invent.kde.org/qt/qt/qtbase/-/blob/dev/src/widgets/styles/qcommonstyle.cpp#L6204 where some effects are applied, but for Active it doesn't apply anything. Given how deep in Qt this is I'm rather hesistant about changing anything there Git commit 4142c2b7e7252ee1a2ae4d8aa51970d9457a692e by Arjen Hiemstra. Committed on 08/05/2025 at 08:18. Pushed by ahiemstra into branch 'master'. primitives: Use a custom shader for rendering Icon This replaces all QIcon effects, masking and transition animation with a custom shader that does the same, making use of the new ShaderNode to avoid a lot of boilerplate. Related: bug 486724 M +42 -87 src/primitives/icon.cpp M +0 -1 src/primitives/icon.h M +21 -0 src/primitives/shaders.cmake A +58 -0 src/primitives/shaders/icon.frag A +37 -0 src/primitives/shaders/icon.vert https://invent.kde.org/frameworks/kirigami/-/commit/4142c2b7e7252ee1a2ae4d8aa51970d9457a692e Wow, you all are amazing. Even though it's not the big of a deal you still went in a fixed the issue. Much appreciated and thanks!! |