change easing curve
This commit is contained in:
parent
74cecb25d3
commit
8192532db5
|
@ -36,7 +36,7 @@ IconMenu::IconMenu(const QIcon &icon, QWidget *parent)
|
||||||
_animation->setStartValue(1);
|
_animation->setStartValue(1);
|
||||||
_animation->setEndValue(0);
|
_animation->setEndValue(0);
|
||||||
|
|
||||||
_animation->setEasingCurve(QEasingCurve::InBounce);
|
_animation->setEasingCurve(QEasingCurve::InQuad);
|
||||||
|
|
||||||
_menu->hide();
|
_menu->hide();
|
||||||
|
|
||||||
|
@ -87,8 +87,8 @@ void IconMenu::toggleMenu()
|
||||||
{
|
{
|
||||||
if (QAbstractAnimation::Running != _animation->state()) {
|
if (QAbstractAnimation::Running != _animation->state()) {
|
||||||
_animation->setEasingCurve(_menuVisible
|
_animation->setEasingCurve(_menuVisible
|
||||||
? QEasingCurve::OutCubic
|
? QEasingCurve::OutQuad
|
||||||
: QEasingCurve::InBounce);
|
: QEasingCurve::InQuad);
|
||||||
}
|
}
|
||||||
|
|
||||||
_animation->setDirection(_menuVisible
|
_animation->setDirection(_menuVisible
|
||||||
|
|
Loading…
Reference in New Issue