Fix transition between normal and hover images
Review Request #109614 - Created March 20, 2013 and submitted
This is a follow-up to https://git.reviewboard.kde.org/r/108858/ . It has been brought to my attention the painting code I wrote was still wrong: when you mouse over items, the transition between the normal and hover images is not as smooth as it should be. Especially at the end, one has the feeling of a "bump". I did quite a bit of debugging on that bug and wrote the result of my research in a huge comment. It may be too big, I am happy to remove it. I am probably going to blog about this anyway, since the hunt for that bug was interesting.
Moved the mouse over normal and hidden items, transition is smooth.
Thanks Aurélien for your efforts to fix this! Looks good, I would just rename pix1 and pix2 to pixmap1 and pixmap2 to be consistent with other code (we mostly try to not abbreviate variable names). The comment is indeed a bit long. Maybe we could just say "Linear interpolation between m_pixmap and m_hoverPixmap. Note that this cannot be achieved by painting m_hoverPixmap over m_pixmap, even if the opacities are adjusted. For details see (link to review request, blog, or something like that)". I'm looking forward to your blog post about this :-)