API REVIEW: *Slide* -> *Slide*Movement
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800796
This commit is contained in:
parent
d6995254db
commit
eba58a193d
@ -62,8 +62,8 @@ int Animator::animationDuration(Plasma::Phase::Animation) const
|
||||
int Animator::movementAnimationDuration(Plasma::Phase::Movement movement) const
|
||||
{
|
||||
switch (movement) {
|
||||
case Phase::FastSlideIn:
|
||||
case Phase::FastSlideOut:
|
||||
case Phase::FastSlideInMovement:
|
||||
case Phase::FastSlideOutMovement:
|
||||
return 100;
|
||||
break;
|
||||
default:
|
||||
|
@ -215,14 +215,14 @@ void DesktopToolbox::showToolbox()
|
||||
if (!tool->isEnabled()) {
|
||||
if (tool->isVisible()) {
|
||||
const int height = static_cast<int>(tool->boundingRect().height());
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(size() * 2, -height));
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(size() * 2, -height));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
//kDebug() << "let's show and move" << tool << tool->boundingRect();
|
||||
tool->show();
|
||||
phase->moveItem(tool, Plasma::Phase::SlideIn, QPoint(x, y));
|
||||
phase->moveItem(tool, Plasma::Phase::SlideInMovement, QPoint(x, y));
|
||||
//x += 0;
|
||||
y += static_cast<int>(tool->boundingRect().height()) + 5;
|
||||
}
|
||||
@ -271,7 +271,7 @@ void DesktopToolbox::hideToolbox()
|
||||
}
|
||||
|
||||
const int height = static_cast<int>(tool->boundingRect().height());
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(x, y-height));
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(x, y-height));
|
||||
}
|
||||
|
||||
if (d->animId) {
|
||||
|
@ -240,14 +240,14 @@ void PanelToolbox::showToolbox()
|
||||
if (!tool->isEnabled()) {
|
||||
if (tool->isVisible()) {
|
||||
const int height = static_cast<int>(tool->boundingRect().height());
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(size() * 2, -height));
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(size() * 2, -height));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
//kDebug() << "let's show and move" << tool << tool->boundingRect();
|
||||
tool->show();
|
||||
phase->moveItem(tool, Plasma::Phase::SlideIn, QPoint(x, y));
|
||||
phase->moveItem(tool, Plasma::Phase::SlideInMovement, QPoint(x, y));
|
||||
//x += 0;
|
||||
y += static_cast<int>(tool->boundingRect().height()) + 5;
|
||||
}
|
||||
@ -296,7 +296,7 @@ void PanelToolbox::hideToolbox()
|
||||
}
|
||||
|
||||
const int height = static_cast<int>(tool->boundingRect().height());
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(x, y-height));
|
||||
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(x, y-height));
|
||||
}
|
||||
|
||||
if (d->animId) {
|
||||
|
12
phase.cpp
12
phase.cpp
@ -148,14 +148,14 @@ class Phase::Private
|
||||
void performMovement(qreal amount, const MovementState* state)
|
||||
{
|
||||
switch (state->movement) {
|
||||
case Phase::SlideIn:
|
||||
case Phase::FastSlideIn:
|
||||
//kDebug() << "performMovement, SlideIn";
|
||||
case Phase::SlideInMovement:
|
||||
case Phase::FastSlideInMovement:
|
||||
//kDebug() << "performMovement, SlideInMovement";
|
||||
animator->itemSlideIn(amount, state->item, state->start, state->destination);
|
||||
break;
|
||||
case Phase::SlideOut:
|
||||
case Phase::FastSlideOut:
|
||||
//kDebug() << "performMovement, SlideOut";
|
||||
case Phase::SlideOutMovement:
|
||||
case Phase::FastSlideOutMovement:
|
||||
//kDebug() << "performMovement, SlideOutMovement";
|
||||
animator->itemSlideOut(amount, state->item, state->start, state->destination);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user