From 1b79a94f26043f159c8b7335e2f203bb8c3778bd Mon Sep 17 00:00:00 2001 From: FarmRadio Hangar Date: Fri, 13 May 2016 09:44:40 +0300 Subject: [PATCH] tweak slider animations --- components/sliderstatemachine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/sliderstatemachine.cpp b/components/sliderstatemachine.cpp index 26f9bb0..21047a9 100644 --- a/components/sliderstatemachine.cpp +++ b/components/sliderstatemachine.cpp @@ -149,7 +149,9 @@ SliderStateMachine::SliderStateMachine(Slider *parent, transition = new QSignalTransition(parent, SIGNAL(sliderPressed())); transition->setTargetState(slidingState); - transition->addAnimation(new QPropertyAnimation(thumb, "diameter")); + animation = new QPropertyAnimation(thumb, "diameter"); + animation->setDuration(70); + transition->addAnimation(animation); animation = new QPropertyAnimation(thumb, "haloSize"); animation->setEasingCurve(QEasingCurve::InOutSine); @@ -160,7 +162,9 @@ SliderStateMachine::SliderStateMachine(Slider *parent, transition = new QSignalTransition(parent, SIGNAL(sliderReleased())); transition->setTargetState(focusState); - transition->addAnimation(new QPropertyAnimation(thumb, "diameter")); + animation = new QPropertyAnimation(thumb, "diameter"); + animation->setDuration(70); + transition->addAnimation(animation); animation = new QPropertyAnimation(thumb, "haloSize"); animation->setEasingCurve(QEasingCurve::InOutSine);