https://bugs.kde.org/show_bug.cgi?id=463685

--- Comment #1 from Alexis Murzeau <amub...@gmail.com> ---
Created attachment 154936
  --> https://bugs.kde.org/attachment.cgi?id=154936&action=edit
Video of the icon fading patched to avoid the darkening. Animation slowed down
x5. Patch1.

I've found the code that manage the fading is in `IconItem::updatePaintNode` in
`plasma-framework/src/declarativeimports/core/iconitem.cpp`.

I found that doing this avoid the darkening:
- Split the animation in 2 phases (first between 0% and 50% of the animation
value, then between 50% and 100%):
  - First, keep the previous existing image (oldNode->firstChild) opacity 1.0
(100% opaque) and progressevly increase the new image (oldNode->lastChild)
opacity from 0.0 to 1.0
  - At the middle of the animation, both the previous and new images are
rendered at 100% opacity.
  - Then secondly, progressively decrease the previous image opacity from 1.0
to 0.0

You can see the result in the video in attachment:
plasma-framework-icon-fading-split-animation-patch1.mp4

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to