From 3b589bbd680a8c0efe5064a54b8962adaff64da3 Mon Sep 17 00:00:00 2001 From: Adenilson Cavalcanti Da Silva Date: Mon, 22 Feb 2010 22:06:05 +0000 Subject: [PATCH] Implementing now the support for 'bigger icons' in the animation itself (it is missing the setting of the scale factor), but at least there is not any regression in the code. svn path=/trunk/KDE/kdelibs/; revision=1094544 --- animations/pulser.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/animations/pulser.cpp b/animations/pulser.cpp index c9100e18e..15b3e76d9 100644 --- a/animations/pulser.cpp +++ b/animations/pulser.cpp @@ -97,6 +97,15 @@ void PulseAnimation::updateState(QAbstractAnimation::State newState, QAbstractAn setCopy(); } + if (m_under.data()->isIconBigger()) { + m_under.data()->setScale(0); + m_endScale = 1.0; + + } else { + m_scale = 0; + m_endScale = 1.5; + } + if (m_under.data()->isVisible() == false) { m_under.data()->setVisible(true); } @@ -112,8 +121,15 @@ void PulseAnimation::updateCurrentTime(int currentTime) { if (m_under.data()) { qreal delta = Animation::easingCurve().valueForProgress( currentTime / qreal(duration())); - delta = (1 - m_endScale) * delta; - m_under.data()->setScale(1 - delta); + + if (m_under.data()->isIconBigger()) { + /* TODO: calculate the scale for bigger icon */ + + } else { + m_under.data()->setScale(delta); + delta = (1 - m_endScale) * delta; + m_under.data()->setScale(1 - delta); + } delta = currentTime / qreal(duration()); if (direction() == Forward) {