diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-14 07:55:08 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-14 07:55:47 +0100 |
commit | dbafb99472120efaa9ce219cf0532498e1a5e04a (patch) | |
tree | 6ca714b3daa5d96565cf348ff940730973c3acee /src/qt/bitcoingui.cpp | |
parent | e4f041bdd133af5eb7461a8dda4ba62fe4d6f117 (diff) | |
parent | f10b2d70d09c2e9f5c14ba5e3673c5fb31aa9468 (diff) |
Merge pull request #3526
f10b2d7 qt: use series of pngs for spinner (Wladimir J. van der Laan)
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 67ffa330d7..692fb6dc1d 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -39,7 +39,6 @@ #include <QMenuBar> #include <QMessageBox> #include <QMimeData> -#include <QMovie> #include <QProgressBar> #include <QSettings> #include <QStackedWidget> @@ -68,7 +67,8 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) : trayIcon(0), notificator(0), rpcConsole(0), - prevBlocks(0) + prevBlocks(0), + spinnerFrame(0) { GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this); @@ -187,8 +187,6 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) : statusBar()->addWidget(progressBar); statusBar()->addPermanentWidget(frameBlocks); - syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this); - connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show())); // prevents an oben debug window from becoming stuck/unusable on client shutdown @@ -684,9 +682,13 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) progressBar->setVisible(true); tooltip = tr("Catching up...") + QString("<br>") + tooltip; - labelBlocksIcon->setMovie(syncIconMovie); if(count != prevBlocks) - syncIconMovie->jumpToNextFrame(); + { + labelBlocksIcon->setPixmap(QIcon(QString( + ":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0'))) + .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES; + } prevBlocks = count; #ifdef ENABLE_WALLET |