diff --git a/application.qrc b/application.qrc index 0a2e24e..4253633 100644 --- a/application.qrc +++ b/application.qrc @@ -12,6 +12,7 @@ res/zcashdlogo.gif res/logobig.gif res/silentdragon-animated.gif + res/silentdragon-animated-dark.gif res/silentdragon_bg.qm diff --git a/res/silentdragon-animated-dark.gif b/res/silentdragon-animated-dark.gif new file mode 100644 index 0000000..10999e1 Binary files /dev/null and b/res/silentdragon-animated-dark.gif differ diff --git a/res/silentdragon-animated.gif b/res/silentdragon-animated.gif index 1b939a8..c7c521c 100644 Binary files a/res/silentdragon-animated.gif and b/res/silentdragon-animated.gif differ diff --git a/src/connection.cpp b/src/connection.cpp index 3482eef..3e48f95 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -19,11 +19,19 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, RPC* rpc) { d->setWindowFlags(d->windowFlags() & ~(Qt::WindowCloseButtonHint | Qt::WindowContextHelpButtonHint)); connD = new Ui_ConnectionDialog(); connD->setupUi(d); - QMovie *movie = new QMovie(":/img/res/silentdragon-animated.gif"); - //QPixmap logo(":/img/res/silentdragon-animated.gif"); - connD->topIcon->setMovie(movie); - movie->start(); - //main->logger->write("set topIcon"); + QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated.gif");; + QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; + auto theme = Settings::getInstance()->get_theme_name(); + if (theme == "dark") { + movie2->setScaledSize(QSize(512,512)); + connD->topIcon->setMovie(movie2); + movie2->start(); + } else { + movie1->setScaledSize(QSize(512,512)); + connD->topIcon->setMovie(movie1); + movie1->start(); + } + main->logger->write("set animation"); } ConnectionLoader::~ConnectionLoader() { diff --git a/src/rpc.cpp b/src/rpc.cpp index 50e8d17..2519964 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1218,9 +1218,19 @@ void RPC::shutdownZcashd() { Ui_ConnectionDialog connD; connD.setupUi(&d); //connD.topIcon->setBasePixmap(QIcon(":/icons/res/icon.ico").pixmap(256, 256)); - QMovie *movie = new QMovie(":/img/res/silentdragon-animated.gif"); - connD.topIcon->setMovie(movie); - movie->start(); + + QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated.gif");; + QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; + auto theme = Settings::getInstance()->get_theme_name(); + if (theme == "dark") { + movie2->setScaledSize(QSize(512,512)); + connD.topIcon->setMovie(movie2); + movie2->start(); + } else { + 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 f5dd1aa..4b0b325 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -707,14 +707,23 @@ void MainWindow::sendButton() { // Show a dialog to confirm the Tx if (confirmTx(tx)) { - // Create a new Dialog to show that we are computing/sending the Tx + // Create a new Dialog to show that we are computing/sending the Tx auto d = new QDialog(this); auto connD = new Ui_ConnectionDialog(); connD->setupUi(d); - QMovie *movie = new QMovie(":/img/res/silentdragon-animated.gif"); - connD->topIcon->setMovie(movie); - movie->start(); + QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated.gif");; + QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; + auto theme = Settings::getInstance()->get_theme_name(); + if (theme == "dark") { + movie2->setScaledSize(QSize(512,512)); + connD->topIcon->setMovie(movie2); + movie2->start(); + } else { + movie1->setScaledSize(QSize(512,512)); + connD->topIcon->setMovie(movie1); + movie1->start(); + } //connD->topIcon->setBasePixmap(logo.scaled(256, 256, Qt::KeepAspectRatio, Qt::SmoothTransformation));