Commit 8bfdc82c authored by Alessandro Portale's avatar Alessandro Portale

FancyLineEdit: De-duplicate some code

Change-Id: Ia9bf5db44d4546ae756d2d4ecca3c4057076f69a
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 2f735a12
......@@ -542,17 +542,10 @@ void IconButton::paintEvent(QPaintEvent *)
void IconButton::animateShow(bool visible)
{
if (visible) {
QPropertyAnimation *animation = new QPropertyAnimation(this, "iconOpacity");
animation->setDuration(FADE_TIME);
animation->setEndValue(1.0);
animation->start(QAbstractAnimation::DeleteWhenStopped);
} else {
QPropertyAnimation *animation = new QPropertyAnimation(this, "iconOpacity");
animation->setDuration(FADE_TIME);
animation->setEndValue(0.0);
animation->start(QAbstractAnimation::DeleteWhenStopped);
}
QPropertyAnimation *animation = new QPropertyAnimation(this, "iconOpacity");
animation->setDuration(FADE_TIME);
animation->setEndValue(visible ? 1.0 : 0.0);
animation->start(QAbstractAnimation::DeleteWhenStopped);
}
QSize IconButton::sizeHint() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment