[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma/applets/rssnow
From: Rob Scheepmaker <r.scheepmaker () student ! utwente ! nl>
Date: 2008-04-11 14:30:12
Message-ID: 1207924212.423507.3504.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 795825 by scheepmaker:
Make use of the just added isAnimating() function of Phase, to make sure the \
animations are always super smooth... :)
M +8 -2 scroller.cpp
--- trunk/playground/base/plasma/applets/rssnow/scroller.cpp #795824:795825
@@ -228,6 +228,7 @@
void Scroller::animationComplete(AnimId id)
{
+ bool stillAnimating = false;
if (id == m_animid) {
m_animid = 0;
m_activeitemlist->takeFirst(); //remove the first item.
@@ -235,13 +236,18 @@
m_delayedPrev = 0;
m_delayedNext--;
QTimer::singleShot(0, this, SLOT(moveNext()));
+ stillAnimating = true;
} else if (m_delayedPrev > 0) {
m_delayedPrev--;
QTimer::singleShot(0, this, SLOT(movePrev()));
- } else {
- QTimer::singleShot(40, this, SLOT(clearUnusedItems()));
+ stillAnimating = true;
}
}
+
+ if (!stillAnimating && (m_itemlist->size() > 2) &&
+ !Phase::self()->isAnimating()) {
+ QTimer::singleShot(0, this, SLOT(clearUnusedItems()));
+ }
}
void Scroller::animate(qreal anim)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic