make the colorization effect more noticeable, which in turn makes it feel smoother.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=761575
This commit is contained in:
Aaron J. Seigo 2008-01-15 07:09:21 +00:00
parent 47fbc5aa5a
commit 6a26e85e1a

View File

@ -131,14 +131,14 @@ void DesktopToolbox::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
const qreal progress = m_animFrame / m_size;
if (progress > 0.1) {
m_icon.paint(painter, QRect(m_size*2 - 34, 2, 32, 32));
if (progress <= 0.9) {
m_icon.paint(painter, QRect(m_size*2 - 34, 2, 32, 32), Qt::AlignCenter, QIcon::Disabled, QIcon::Off);
}
if (progress <= 0.9) {
if (progress > 0.1) {
painter->save();
painter->setOpacity(1 - progress);
m_icon.paint(painter, QRect(m_size*2 - 34, 2, 32, 32), Qt::AlignCenter, QIcon::Disabled, QIcon::Off);
painter->setOpacity(progress);
m_icon.paint(painter, QRect(m_size*2 - 34, 2, 32, 32));
painter->restore();
}
}