* fix a math error in the movement framerate calc

* increase the quality of movements (more frames)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=859588
This commit is contained in:
Aaron J. Seigo 2008-09-10 18:42:11 +00:00
parent d8d250103a
commit 8b3510bf7e
2 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ int AnimationDriver::animationFps(Plasma::Animator::Animation animation) const
int AnimationDriver::movementAnimationFps(Plasma::Animator::Movement movement) const
{
Q_UNUSED(movement)
return 20;
return 40;
}
int AnimationDriver::elementAnimationFps(Plasma::Animator::Animation animation) const
@ -70,7 +70,7 @@ int AnimationDriver::movementAnimationDuration(Plasma::Animator::Movement moveme
break;
}
return 270;
return 250;
}
int AnimationDriver::elementAnimationDuration(Plasma::Animator::Animation) const

View File

@ -338,9 +338,9 @@ int Animator::moveItem(QGraphicsItem* item, Movement movement, const QPoint &des
state->frames = (duration / 1000.0) * frames;
state->currentFrame = 0;
state->interval = duration / state->frames;
state->interval -= qMax(MIN_TICK_RATE_INT, state->interval % MIN_TICK_RATE_INT);
state->interval = qMax(MIN_TICK_RATE_INT, state->interval - (state->interval % MIN_TICK_RATE_INT));
// state->interval = (state->interval / MIN_TICK_RATE) * MIN_TICK_RATE;
//kDebug() << "interval of" << state->interval;
// kDebug() << "interval of" << state->interval << state->frames << duration << frames;
state->currentInterval = state->interval;
state->qobj = dynamic_cast<QObject*>(item);