mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Add missing parents
This commit is contained in:
parent
b3bb0531de
commit
e5ef84617c
1 changed files with 3 additions and 3 deletions
|
@ -106,21 +106,21 @@ void SlidingStackWidget::slideInWidget(QWidget *next_widget, AnimationDirection
|
||||||
next_widget->raise();
|
next_widget->raise();
|
||||||
|
|
||||||
// Animate both the next and now widget.
|
// Animate both the next and now widget.
|
||||||
QPropertyAnimation *animation_now = new QPropertyAnimation(widget(now), "pos");
|
QPropertyAnimation *animation_now = new QPropertyAnimation(widget(now), "pos", this);
|
||||||
|
|
||||||
animation_now->setDuration(speed_);
|
animation_now->setDuration(speed_);
|
||||||
animation_now->setEasingCurve(animation_type_);
|
animation_now->setEasingCurve(animation_type_);
|
||||||
animation_now->setStartValue(QPoint(pnow.x(), pnow.y()));
|
animation_now->setStartValue(QPoint(pnow.x(), pnow.y()));
|
||||||
animation_now->setEndValue(QPoint(pnow.x() + offset_x, pnow.y()));
|
animation_now->setEndValue(QPoint(pnow.x() + offset_x, pnow.y()));
|
||||||
|
|
||||||
QPropertyAnimation *animation_next = new QPropertyAnimation(next_widget, "pos");
|
QPropertyAnimation *animation_next = new QPropertyAnimation(next_widget, "pos", this);
|
||||||
|
|
||||||
animation_next->setDuration(speed_);
|
animation_next->setDuration(speed_);
|
||||||
animation_next->setEasingCurve(animation_type_);
|
animation_next->setEasingCurve(animation_type_);
|
||||||
animation_next->setStartValue(QPoint(pnext.x() - offset_x, pnext.y()));
|
animation_next->setStartValue(QPoint(pnext.x() - offset_x, pnext.y()));
|
||||||
animation_next->setEndValue(QPoint(pnext.x(), pnext.y()));
|
animation_next->setEndValue(QPoint(pnext.x(), pnext.y()));
|
||||||
|
|
||||||
QParallelAnimationGroup *animation_group = new QParallelAnimationGroup;
|
QParallelAnimationGroup *animation_group = new QParallelAnimationGroup(this);
|
||||||
|
|
||||||
animation_group->addAnimation(animation_now);
|
animation_group->addAnimation(animation_now);
|
||||||
animation_group->addAnimation(animation_next);
|
animation_group->addAnimation(animation_next);
|
||||||
|
|
Loading…
Reference in a new issue