Bug 487577

Summary: Kirigami.Icon shows two icons overlayed when transition is animated
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Ismael Asensio <isma.af>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: me, notmart, qydwhotmail
Priority: NOR Keywords: regression
Version First Reported In: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Test case snippet
Visual bug on plasma panel

Description Ismael Asensio 2024-05-26 10:40:27 UTC
SUMMARY

When using a Kirigami.Icon with `animated: true` (which is the default for plasma items), the first icon loaded is never deleted and keeps showing behind the newly loaded icons, with the visual result of one icon layered on top of the other.

STEPS TO REPRODUCE
1. Use a Kirigami.Icon with `animated: true`, and switch the icon source 
(or run the attached test snipped `kqml test_animated_icon.qml` when I'm able to attach it to bugzilla)

OBSERVED RESULT
The transition between icons produces two icons overlayed

EXPECTED RESULT
The transition between icons is animated with no leftover icons

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 24.04
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0
Kernel Version: 6.8.0-31-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
System Version: 0.1

ADDITIONAL INFORMATION
It doesn't happen when reverting https://invent.kde.org/frameworks/kirigami/-/commit/885cf03eb07a24e7de9e73e4e35ee047467a55b5
Comment 1 Ismael Asensio 2024-05-26 10:44:35 UTC
Created attachment 169847 [details]
Test case snippet
Comment 2 Ismael Asensio 2024-05-26 10:45:48 UTC
Created attachment 169848 [details]
Visual bug on plasma panel
Comment 3 Arjen Hiemstra 2024-05-31 12:50:51 UTC
Git commit f66c9efb56b9b215084c18234f0f029c01951275 by Arjen Hiemstra.
Committed on 31/05/2024 at 12:50.
Pushed by ahiemstra into branch 'master'.

Revert "icon: Remove the node with lowest opacity when animation end"

This reverts commit 885cf03eb07a24e7de9e73e4e35ee047467a55b5

Apparently this causes issues in some cases and also seems to no longer actually fix things when using Qt 6.7.1.

Ultimately this needs a proper upstream fix.

M  +3    -20   src/primitives/icon.cpp

https://invent.kde.org/frameworks/kirigami/-/commit/f66c9efb56b9b215084c18234f0f029c01951275