From 5ca231cdcbc4e51d05cb7b0642af05bbe423649c Mon Sep 17 00:00:00 2001 From: laserpants Date: Tue, 22 Mar 2016 12:53:10 +0300 Subject: [PATCH] set animation start values to defaults --- components/raisedbutton.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/raisedbutton.cpp b/components/raisedbutton.cpp index 8636e2c..2885464 100644 --- a/components/raisedbutton.cpp +++ b/components/raisedbutton.cpp @@ -17,7 +17,7 @@ RaisedButton::RaisedButton(QWidget *parent) animation = new QPropertyAnimation; animation->setTargetObject(effect); animation->setPropertyName("distance"); - animation->setStartValue(2); + animation->setStartValue(effect->distance()); animation->setEndValue(6); animation->setDuration(100); _group.addAnimation(animation); @@ -25,7 +25,7 @@ RaisedButton::RaisedButton(QWidget *parent) animation = new QPropertyAnimation; animation->setTargetObject(effect); animation->setPropertyName("blurRadius"); - animation->setStartValue(10); + animation->setStartValue(effect->blurRadius()); animation->setEndValue(20); animation->setDuration(100); _group.addAnimation(animation); @@ -59,6 +59,8 @@ void RaisedButton::mouseReleaseEvent(QMouseEvent *event) void RaisedButton::paintEvent(QPaintEvent *event) { + Q_UNUSED(event) + QStylePainter painter(this); painter.drawControl(QStyle::CE_PushButton, getStyleOption());