From d407d7aff36aabb31e908a490617eb3753228d9e Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 25 Nov 2021 10:31:16 -0500 Subject: [PATCH] Fix animations on send and shutdown --- src/rpc.cpp | 15 ++++----------- src/sendtab.cpp | 15 ++++----------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/rpc.cpp b/src/rpc.cpp index 3619bdb..378c755 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1359,18 +1359,11 @@ void RPC::shutdownHushd() { connD.setupUi(&d); //connD.topIcon->setBasePixmap(QIcon(":/icons/res/icon.ico").pixmap(256, 256)); - QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated.gif");; - QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; + QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { - movie2->setScaledSize(QSize(512,512)); - connD.topIcon->setMovie(movie2); - movie2->start(); - } else { - movie1->setScaledSize(QSize(512,512)); - connD.topIcon->setMovie(movie1); - movie1->start(); - } + movie1->setScaledSize(QSize(512,512)); + connD.topIcon->setMovie(movie1); + movie1->start(); connD.status->setText(QObject::tr("Please enhance your calm and wait for SilentDragon to exit")); connD.statusDetail->setText(QObject::tr("Waiting for hushd to exit, y'all")); diff --git a/src/sendtab.cpp b/src/sendtab.cpp index 6c5e11f..d185735 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -702,18 +702,11 @@ void MainWindow::sendButton() { auto connD = new Ui_ConnectionDialog(); connD->setupUi(d); - QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated.gif");; - QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; + QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { - movie2->setScaledSize(QSize(512,512)); - connD->topIcon->setMovie(movie2); - movie2->start(); - } else { - movie1->setScaledSize(QSize(512,512)); - connD->topIcon->setMovie(movie1); - movie1->start(); - } + movie1->setScaledSize(QSize(512,512)); + connD->topIcon->setMovie(movie1); + movie1->start(); //connD->topIcon->setBasePixmap(logo.scaled(256, 256, Qt::KeepAspectRatio, Qt::SmoothTransformation));