mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: animate the height of KMessageWidget from KMessageWidget::animatedHide()
can animate the opacity too but size change animation suits better a message widget that is not dialog, still it happens in 500ms and renders much faster than the previous snapshot-based approach so.. Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8bf6e8bd73
commit
c32db57584
1 changed files with 6 additions and 5 deletions
|
@ -317,7 +317,7 @@ void KMessageWidget::animatedShow()
|
|||
d->animation = new QPropertyAnimation(this, "windowOpacity", this);
|
||||
d->animation->setStartValue(0.0);
|
||||
d->animation->setEndValue(1.0);
|
||||
d->animation->setEasingCurve(QEasingCurve::InOutQuad);
|
||||
d->animation->setEasingCurve(QEasingCurve::InQuad);
|
||||
d->animation->setDuration(s_kmessageanimationduration);
|
||||
d->animation->start();
|
||||
QFrame::show();
|
||||
|
@ -339,10 +339,11 @@ void KMessageWidget::animatedHide()
|
|||
return;
|
||||
}
|
||||
|
||||
d->animation = new QPropertyAnimation(this, "windowOpacity", this);
|
||||
d->animation->setStartValue(1.0);
|
||||
d->animation->setEndValue(0.0);
|
||||
d->animation->setEasingCurve(QEasingCurve::InOutQuad);
|
||||
setMaximumHeight(height());
|
||||
d->animation = new QPropertyAnimation(this, "maximumHeight", this);
|
||||
d->animation->setStartValue(height());
|
||||
d->animation->setEndValue(0);
|
||||
d->animation->setEasingCurve(QEasingCurve::OutQuad);
|
||||
d->animation->setDuration(s_kmessageanimationduration);
|
||||
d->animation->start();
|
||||
QFrame::hide();
|
||||
|
|
Loading…
Add table
Reference in a new issue