* 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:
parent
d8d250103a
commit
8b3510bf7e
@ -45,7 +45,7 @@ int AnimationDriver::animationFps(Plasma::Animator::Animation animation) const
|
|||||||
int AnimationDriver::movementAnimationFps(Plasma::Animator::Movement movement) const
|
int AnimationDriver::movementAnimationFps(Plasma::Animator::Movement movement) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(movement)
|
Q_UNUSED(movement)
|
||||||
return 20;
|
return 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AnimationDriver::elementAnimationFps(Plasma::Animator::Animation animation) const
|
int AnimationDriver::elementAnimationFps(Plasma::Animator::Animation animation) const
|
||||||
@ -70,7 +70,7 @@ int AnimationDriver::movementAnimationDuration(Plasma::Animator::Movement moveme
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 270;
|
return 250;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AnimationDriver::elementAnimationDuration(Plasma::Animator::Animation) const
|
int AnimationDriver::elementAnimationDuration(Plasma::Animator::Animation) const
|
||||||
|
@ -338,9 +338,9 @@ int Animator::moveItem(QGraphicsItem* item, Movement movement, const QPoint &des
|
|||||||
state->frames = (duration / 1000.0) * frames;
|
state->frames = (duration / 1000.0) * frames;
|
||||||
state->currentFrame = 0;
|
state->currentFrame = 0;
|
||||||
state->interval = duration / state->frames;
|
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;
|
// 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->currentInterval = state->interval;
|
||||||
state->qobj = dynamic_cast<QObject*>(item);
|
state->qobj = dynamic_cast<QObject*>(item);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user