Bug 489756 - Kirigami.Icon's lightening effect is broken on dark color schemes with light icons
Summary: Kirigami.Icon's lightening effect is broken on dark color schemes with light ...
Status: CONFIRMED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: tqd8
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-04 21:25 UTC by tqd8
Modified: 2024-11-01 06:07 UTC (History)
3 users (show)

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


Attachments
Hovering over system tray icons, with Breeze light and Breeze dark (740.94 KB, video/mp4)
2024-07-04 21:25 UTC, tqd8
Details
Hovering over system tray icons, with Breeze light and Breeze dark (479.62 KB, video/mp4)
2024-10-26 18:07 UTC, tqd8
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tqd8 2024-07-04 21:25:04 UTC
Created attachment 171385 [details]
Hovering over system tray icons, with Breeze light and Breeze dark

SUMMARY
It looks like the hover effect on system tray icons is working fine on light themes (dark icons), but is broken on dark themes (light icons). The animation just flickers once instead of staying highlighted. Video attached.

OS: openSUSE Krypton (today's git master)
Comment 1 Nate Graham 2024-07-27 23:09:37 UTC
Can reproduce.
Comment 2 Nate Graham 2024-09-24 16:35:14 UTC
*** This bug has been marked as a duplicate of bug 466357 ***
Comment 3 tqd8 2024-10-26 18:07:17 UTC
Created attachment 175256 [details]
Hovering over system tray icons, with Breeze light and Breeze dark

This bug is still happening even after https://invent.kde.org/frameworks/kirigami/-/merge_requests/1645 but appears slightly differently now.

With dark panel (light icons), it seems that only colored parts of the icons (red slashes, green plug) get highlighted, and not the grayscale parts.
Comment 4 Nate Graham 2024-10-28 15:26:06 UTC
Yes, can confirm.
Comment 5 tqd8 2024-11-01 05:40:46 UTC
Did a little more investigating.

If you use a color picker on the icons, it turns out that the white parts *do* get highlighted, extremely slightly. But the gray parts do not change at all. And apparently the gray parts are actually transparent (e.g. https://invent.kde.org/plasma/libplasma/-/merge_requests/40).

Maybe this is due to this https://invent.kde.org/frameworks/kirigami/-/blob/23220de1733bab4ea7e1a6b9289c22aca7aa3ff1/src/primitives/icon.cpp#L393 or this https://invent.kde.org/frameworks/kirigami/-/blob/23220de1733bab4ea7e1a6b9289c22aca7aa3ff1/src/primitives/icon.cpp#L642 ? (Also not sure why this line is there twice?)

As in, maybe the overall issue is between the svg icons' ColorScheme-Text, svg icons' opacity, Breeze Dark theme's highlightedTextColor, and the above lines in some way?
Comment 6 tqd8 2024-11-01 06:07:03 UTC
Maybe also involved is the CompositionMode (https://doc.qt.io/qt-6/qpainter.html#CompositionMode-enum) just below those lines?

If this is all refactored into a shader like Marco mentioned, I think this will all become moot, but still noting here in case I (or anyone else) get the chance to try a short-term fix before then.