From 6a26e85e1a1d883e1b3b3f462e2571d5c2340245 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 15 Jan 2008 07:09:21 +0000 Subject: [PATCH] make the colorization effect more noticeable, which in turn makes it feel smoother. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=761575 --- desktoptoolbox.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/desktoptoolbox.cpp b/desktoptoolbox.cpp index a92211fb1..213128a94 100644 --- a/desktoptoolbox.cpp +++ b/desktoptoolbox.cpp @@ -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(); } }