From 84479022654b194a98b7eb1b9d9503a77e8ffa6c Mon Sep 17 00:00:00 2001 From: Charles <18726788+csharpee@users.noreply.github.com> Date: Fri, 1 May 2020 14:54:46 -0400 Subject: [PATCH] fixed theme animation startup bug on switch from dark to light --- src/connection.cpp | 3 ++- src/rpc.cpp | 2 +- src/sendtab.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/connection.cpp b/src/connection.cpp index 72a1446..6936a6e 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -23,7 +23,8 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, RPC* rpc) { QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-startup-dark.gif");; auto theme = Settings::getInstance()->get_theme_name(); auto size = QSize(512,512); - if (theme == "dark" || "midnight") { + + if (theme == "dark" || theme == "midnight") { movie2->setScaledSize(size); connD->topIcon->setMovie(movie2); movie2->start(); diff --git a/src/rpc.cpp b/src/rpc.cpp index a47f592..76f8258 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1222,7 +1222,7 @@ void RPC::shutdownZcashd() { 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" || "midnight") { + if (theme == "dark" || theme == "midnight") { movie2->setScaledSize(QSize(512,512)); connD.topIcon->setMovie(movie2); movie2->start(); diff --git a/src/sendtab.cpp b/src/sendtab.cpp index 3a9ce81..ef0cf2a 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -715,7 +715,7 @@ void MainWindow::sendButton() { 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" || "midnight") { + if (theme == "dark" || theme == "midnight") { movie2->setScaledSize(QSize(512,512)); connD->topIcon->setMovie(movie2); movie2->start();