set animation start values to defaults
This commit is contained in:
parent
bb34b97f74
commit
5ca231cdcb
|
@ -17,7 +17,7 @@ RaisedButton::RaisedButton(QWidget *parent)
|
||||||
animation = new QPropertyAnimation;
|
animation = new QPropertyAnimation;
|
||||||
animation->setTargetObject(effect);
|
animation->setTargetObject(effect);
|
||||||
animation->setPropertyName("distance");
|
animation->setPropertyName("distance");
|
||||||
animation->setStartValue(2);
|
animation->setStartValue(effect->distance());
|
||||||
animation->setEndValue(6);
|
animation->setEndValue(6);
|
||||||
animation->setDuration(100);
|
animation->setDuration(100);
|
||||||
_group.addAnimation(animation);
|
_group.addAnimation(animation);
|
||||||
|
@ -25,7 +25,7 @@ RaisedButton::RaisedButton(QWidget *parent)
|
||||||
animation = new QPropertyAnimation;
|
animation = new QPropertyAnimation;
|
||||||
animation->setTargetObject(effect);
|
animation->setTargetObject(effect);
|
||||||
animation->setPropertyName("blurRadius");
|
animation->setPropertyName("blurRadius");
|
||||||
animation->setStartValue(10);
|
animation->setStartValue(effect->blurRadius());
|
||||||
animation->setEndValue(20);
|
animation->setEndValue(20);
|
||||||
animation->setDuration(100);
|
animation->setDuration(100);
|
||||||
_group.addAnimation(animation);
|
_group.addAnimation(animation);
|
||||||
|
@ -59,6 +59,8 @@ void RaisedButton::mouseReleaseEvent(QMouseEvent *event)
|
||||||
|
|
||||||
void RaisedButton::paintEvent(QPaintEvent *event)
|
void RaisedButton::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(event)
|
||||||
|
|
||||||
QStylePainter painter(this);
|
QStylePainter painter(this);
|
||||||
|
|
||||||
painter.drawControl(QStyle::CE_PushButton, getStyleOption());
|
painter.drawControl(QStyle::CE_PushButton, getStyleOption());
|
||||||
|
|
Loading…
Reference in New Issue