move correctly the pages at the first animation
svn path=/trunk/KDE/kdelibs/; revision=1031682
This commit is contained in:
parent
c61ec3e94e
commit
0e59e70583
@ -372,16 +372,19 @@ void TabBar::setCurrentIndex(int index)
|
|||||||
QRect beforeCurrentGeom(d->oldPage->geometry().toRect());
|
QRect beforeCurrentGeom(d->oldPage->geometry().toRect());
|
||||||
beforeCurrentGeom.moveTopRight(beforeCurrentGeom.topLeft());
|
beforeCurrentGeom.moveTopRight(beforeCurrentGeom.topLeft());
|
||||||
|
|
||||||
d->newPageAnimId = Animator::self()->moveItem(
|
|
||||||
d->newPage, Plasma::Animator::SlideOutMovement,
|
|
||||||
d->oldPage->pos().toPoint());
|
|
||||||
if (index > d->currentIndex) {
|
if (index > d->currentIndex) {
|
||||||
d->newPage->setPos(d->oldPage->geometry().topRight());
|
d->newPage->setPos(d->oldPage->geometry().topRight());
|
||||||
|
d->newPageAnimId = Animator::self()->moveItem(
|
||||||
|
d->newPage, Plasma::Animator::SlideOutMovement,
|
||||||
|
d->oldPage->pos().toPoint());
|
||||||
d->oldPageAnimId = Animator::self()->moveItem(
|
d->oldPageAnimId = Animator::self()->moveItem(
|
||||||
d->oldPage, Plasma::Animator::SlideOutMovement,
|
d->oldPage, Plasma::Animator::SlideOutMovement,
|
||||||
beforeCurrentGeom.topLeft());
|
beforeCurrentGeom.topLeft());
|
||||||
} else {
|
} else {
|
||||||
d->newPage->setPos(beforeCurrentGeom.topLeft());
|
d->newPage->setPos(beforeCurrentGeom.topLeft());
|
||||||
|
d->newPageAnimId = Animator::self()->moveItem(
|
||||||
|
d->newPage, Plasma::Animator::SlideOutMovement,
|
||||||
|
d->oldPage->pos().toPoint());
|
||||||
d->oldPageAnimId = Animator::self()->moveItem(
|
d->oldPageAnimId = Animator::self()->moveItem(
|
||||||
d->oldPage, Plasma::Animator::SlideOutMovement,
|
d->oldPage, Plasma::Animator::SlideOutMovement,
|
||||||
d->oldPage->geometry().topRight().toPoint());
|
d->oldPage->geometry().topRight().toPoint());
|
||||||
|
Loading…
Reference in New Issue
Block a user