Bug 486724 - Kirigami.Icon doesn't apply "active" lightening/highlighting effect to pixmaps, only to icons loaded by name
Summary: Kirigami.Icon doesn't apply "active" lightening/highlighting effect to pixmap...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.2.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-07 12:26 UTC by thegrandfinale2001
Modified: 2025-05-09 23:53 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thegrandfinale2001 2024-05-07 12:26:51 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Icons in the panel produce a highlight effect when you hover over them, including the application launcher icon.  If you choose to use a different icon for the application launcher that icon does not highlight.


STEPS TO REPRODUCE
1. Change icon to an icon to a different icon.
2. Hover over custom icon.
3. No highlighting effect.

OBSERVED RESULT
No highlighting for custom icon.

EXPECTED RESULT
Custom icon should highlight like other icons in panel.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux / KDE Plasma 6.0.4
(available in About System)
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2024-05-07 20:55:09 UTC
Which custom icon did you use? One of the system's standard icons, or else an image file?
Comment 2 thegrandfinale2001 2024-05-07 20:59:39 UTC
(In reply to Nate Graham from comment #1)
> Which custom icon did you use? One of the system's standard icons, or else
> an image file?

It was an image.  PNG and SVG, still the same results.  No standard icon used.
Comment 3 Nate Graham 2024-05-09 19:17:13 UTC
Can confirm. This appears to be happening because we're using the "active" property of Kirigami.Icon to do the lightening effect, and it only works when given an icon name, not a pixmap. Moving to Kirigami.
Comment 4 Arjen Hiemstra 2025-05-08 08:33:47 UTC
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 498530

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