From c8d3d56a965e06c431b95f495cb446bf021b8225 Mon Sep 17 00:00:00 2001 From: laserpants Date: Tue, 22 Mar 2016 17:44:59 +0300 Subject: [PATCH] reverse shadow animation direction for buttons --- components/raisedbutton.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/raisedbutton.cpp b/components/raisedbutton.cpp index 2885464..4df9d9f 100644 --- a/components/raisedbutton.cpp +++ b/components/raisedbutton.cpp @@ -9,6 +9,8 @@ RaisedButton::RaisedButton(QWidget *parent) : FlatButton(parent) { CustomShadowEffect *effect = new CustomShadowEffect; + effect->setBlurRadius(17); + effect->setDistance(6); setGraphicsEffect(effect); setAutoFillBackground(true); @@ -18,7 +20,7 @@ RaisedButton::RaisedButton(QWidget *parent) animation->setTargetObject(effect); animation->setPropertyName("distance"); animation->setStartValue(effect->distance()); - animation->setEndValue(6); + animation->setEndValue(1); animation->setDuration(100); _group.addAnimation(animation); @@ -26,7 +28,7 @@ RaisedButton::RaisedButton(QWidget *parent) animation->setTargetObject(effect); animation->setPropertyName("blurRadius"); animation->setStartValue(effect->blurRadius()); - animation->setEndValue(20); + animation->setEndValue(9); animation->setDuration(100); _group.addAnimation(animation);