mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 14:18:49 +03:00
Fix CI & adjust snackbar animation
This commit is contained in:
parent
4a6becacca
commit
2fe0dbb38c
2 changed files with 3 additions and 3 deletions
|
@ -233,7 +233,7 @@ ImageItem::saveAs()
|
||||||
connect(proxy,
|
connect(proxy,
|
||||||
&DownloadMediaProxy::fileDownloaded,
|
&DownloadMediaProxy::fileDownloaded,
|
||||||
this,
|
this,
|
||||||
[proxy, this, filename](const QByteArray &data) {
|
[proxy, filename](const QByteArray &data) {
|
||||||
proxy->deleteLater();
|
proxy->deleteLater();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -29,10 +29,10 @@ SnackBar::SnackBar(QWidget *parent)
|
||||||
hideTimer_ = QSharedPointer<QTimer>(new QTimer);
|
hideTimer_ = QSharedPointer<QTimer>(new QTimer);
|
||||||
hideTimer_->setSingleShot(true);
|
hideTimer_->setSingleShot(true);
|
||||||
|
|
||||||
auto offset_anim = tweeny::from(1.0f).to(0.0f).during(4000).via(tweeny::easing::elasticOut);
|
auto offset_anim = tweeny::from(1.0f).to(0.0f).during(100).via(tweeny::easing::cubicOut);
|
||||||
connect(showTimer_.data(), &QTimer::timeout, this, [this, offset_anim]() mutable {
|
connect(showTimer_.data(), &QTimer::timeout, this, [this, offset_anim]() mutable {
|
||||||
if (offset_anim.progress() < 1.0f) {
|
if (offset_anim.progress() < 1.0f) {
|
||||||
offset_ = offset_anim.step(0.02f);
|
offset_ = offset_anim.step(0.07f);
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
showTimer_->stop();
|
showTimer_->stop();
|
||||||
|
|
Loading…
Reference in a new issue