Review Request 122859: Don't animate from previous pixmap when IconItem has been invisible
David Rosca
nowrep at gmail.com
Wed Feb 17 15:06:06 UTC 2016
> On Dec. 28, 2015, 12:50 a.m., David Edmundson wrote:
> > src/declarativeimports/core/iconitem.cpp, line 405
> > <https://git.reviewboard.kde.org/r/122859/diff/2/?file=426323#file426323line405>
> >
> > huh? that just reloads the current image whenever visibility gets toggled.
> >
> > 1) that's wrong since eike's patch. loadPixmap is deffered till a polish event before
> >
> > 2) how does that fix anything?
>
> David Rosca wrote:
> What about just clear the m_iconPixmap here?
>
> ```
> void IconItem::itemChange(ItemChange change, const ItemChangeData &value)
> {
> if (change == ItemVisibleHasChanged && value.boolValue) {
> // Clear pixmap to disable animation
> m_iconPixmap = QPixmap();
> }
>
> QQuickItem::itemChange(change, value);
> }
> ```
>
> loadPixmap() is called after the visibility change, so there will be no old pixmap to animate from.
>
> Kai Uwe Broulik wrote:
> I don't want to throw away the pixmap, we might show the same icon again when we become visible.
loadPixmap() throws that anyway, and reloads it even if the icon didn't change.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122859/#review90189
-----------------------------------------------------------
On Dec. 28, 2015, 12:17 a.m., Kai Uwe Broulik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122859/
> -----------------------------------------------------------
>
> (Updated Dec. 28, 2015, 12:17 a.m.)
>
>
> Review request for Plasma.
>
>
> Repository: plasma-framework
>
>
> Description
> -------
>
> We have a lot of reusable singletons that are just hidden when unneeded (tooltip, osd). IconItem, however, will always fade from the previous state, even if the previous action happened minutes ago.
>
> This patch makes it track its visibility and skip the fade-and-wait dance when it just became visible. It also removes a visible false call in the tooltip which I didn't know what it was for. (With it in place, the IconItem always becomes visible when moving between tooltip areas, breaking the animation altogether).
>
> @Eike: Could you check whether this makes it more viable for Kicker?
>
>
> Diffs
> -----
>
> src/declarativeimports/core/iconitem.h 528f57c
> src/declarativeimports/core/iconitem.cpp 1e8260e
> src/declarativeimports/core/tooltip.cpp a5e223b
>
> Diff: https://git.reviewboard.kde.org/r/122859/diff/
>
>
> Testing
> -------
>
> Moving between tray icons - icon fades, moving reaaaally rapidly causes it not to load any icon until you halt (dunno if that happened before but doesn't seem too bad)
> Hovering tray icon, leaving, waiting, hovering another one - icon does not fade, is there right away
> Notifications also don't fade from the previously issued notification icon
>
>
> Thanks,
>
> Kai Uwe Broulik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160217/a15b9df9/attachment.html>
More information about the Plasma-devel
mailing list