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
This commit is contained in:
parent
04e16a4261
commit
3b589bbd68
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user