Fix the selective sync notification folder list being cropped
authorJocelyn Turcotte <jturcotte@woboq.com>
Thu, 27 Jul 2017 08:46:46 +0000 (10:46 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Thu, 27 Jul 2017 15:37:27 +0000 (17:37 +0200)
The maximumHeight would stay at the last animated value.

Issue #5492

src/gui/accountsettings.cpp

index 51a6130a671fb664c6e9d20662c5efd84f82db61..392bd1efcebce465987f1fbdd3fc34e749ea18f1 100644 (file)
@@ -804,9 +804,12 @@ void AccountSettings::refreshSelectiveSyncStatus()
         auto anim = new QPropertyAnimation(ui->selectiveSyncStatus, "maximumHeight", ui->selectiveSyncStatus);
         anim->setEndValue(shouldBeVisible ? hint.height() : 0);
         anim->start(QAbstractAnimation::DeleteWhenStopped);
-        if (!shouldBeVisible) {
-            connect(anim, SIGNAL(finished()), ui->selectiveSyncStatus, SLOT(hide()));
-        }
+        connect(anim, &QPropertyAnimation::finished, [this, shouldBeVisible]() {
+            ui->selectiveSyncStatus->setMaximumHeight(QWIDGETSIZE_MAX);
+            if (!shouldBeVisible) {
+                ui->selectiveSyncStatus->hide();
+            }
+        });
     }
 }