aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-14 07:55:08 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-14 07:55:47 +0100
commitdbafb99472120efaa9ce219cf0532498e1a5e04a (patch)
tree6ca714b3daa5d96565cf348ff940730973c3acee /src/qt
parente4f041bdd133af5eb7461a8dda4ba62fe4d6f117 (diff)
parentf10b2d70d09c2e9f5c14ba5e3673c5fb31aa9468 (diff)
Merge pull request #3526
f10b2d7 qt: use series of pngs for spinner (Wladimir J. van der Laan)
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/Makefile.am2
-rw-r--r--src/qt/bitcoin.qrc36
-rw-r--r--src/qt/bitcoingui.cpp14
-rw-r--r--src/qt/bitcoingui.h2
-rw-r--r--src/qt/guiconstants.h3
-rw-r--r--src/qt/res/movies/spinner-000.pngbin0 -> 861 bytes
-rw-r--r--src/qt/res/movies/spinner-001.pngbin0 -> 835 bytes
-rw-r--r--src/qt/res/movies/spinner-002.pngbin0 -> 849 bytes
-rw-r--r--src/qt/res/movies/spinner-003.pngbin0 -> 844 bytes
-rw-r--r--src/qt/res/movies/spinner-004.pngbin0 -> 836 bytes
-rw-r--r--src/qt/res/movies/spinner-005.pngbin0 -> 855 bytes
-rw-r--r--src/qt/res/movies/spinner-006.pngbin0 -> 852 bytes
-rw-r--r--src/qt/res/movies/spinner-007.pngbin0 -> 888 bytes
-rw-r--r--src/qt/res/movies/spinner-008.pngbin0 -> 865 bytes
-rw-r--r--src/qt/res/movies/spinner-009.pngbin0 -> 847 bytes
-rw-r--r--src/qt/res/movies/spinner-010.pngbin0 -> 854 bytes
-rw-r--r--src/qt/res/movies/spinner-011.pngbin0 -> 856 bytes
-rw-r--r--src/qt/res/movies/spinner-012.pngbin0 -> 861 bytes
-rw-r--r--src/qt/res/movies/spinner-013.pngbin0 -> 882 bytes
-rw-r--r--src/qt/res/movies/spinner-014.pngbin0 -> 847 bytes
-rw-r--r--src/qt/res/movies/spinner-015.pngbin0 -> 849 bytes
-rw-r--r--src/qt/res/movies/spinner-016.pngbin0 -> 851 bytes
-rw-r--r--src/qt/res/movies/spinner-017.pngbin0 -> 848 bytes
-rw-r--r--src/qt/res/movies/spinner-018.pngbin0 -> 850 bytes
-rw-r--r--src/qt/res/movies/spinner-019.pngbin0 -> 830 bytes
-rw-r--r--src/qt/res/movies/spinner-020.pngbin0 -> 847 bytes
-rw-r--r--src/qt/res/movies/spinner-021.pngbin0 -> 850 bytes
-rw-r--r--src/qt/res/movies/spinner-022.pngbin0 -> 858 bytes
-rw-r--r--src/qt/res/movies/spinner-023.pngbin0 -> 854 bytes
-rw-r--r--src/qt/res/movies/spinner-024.pngbin0 -> 868 bytes
-rw-r--r--src/qt/res/movies/spinner-025.pngbin0 -> 865 bytes
-rw-r--r--src/qt/res/movies/spinner-026.pngbin0 -> 864 bytes
-rw-r--r--src/qt/res/movies/spinner-027.pngbin0 -> 855 bytes
-rw-r--r--src/qt/res/movies/spinner-028.pngbin0 -> 836 bytes
-rw-r--r--src/qt/res/movies/spinner-029.pngbin0 -> 846 bytes
-rw-r--r--src/qt/res/movies/spinner-030.pngbin0 -> 866 bytes
-rw-r--r--src/qt/res/movies/spinner-031.pngbin0 -> 871 bytes
-rw-r--r--src/qt/res/movies/spinner-032.pngbin0 -> 861 bytes
-rw-r--r--src/qt/res/movies/spinner-033.pngbin0 -> 849 bytes
-rw-r--r--src/qt/res/movies/spinner-034.pngbin0 -> 859 bytes
-rw-r--r--src/qt/res/movies/update_spinner.mngbin27817 -> 0 bytes
41 files changed, 48 insertions, 9 deletions
diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
index deed59bebd..274cebcf3a 100644
--- a/src/qt/Makefile.am
+++ b/src/qt/Makefile.am
@@ -303,7 +303,7 @@ RES_IMAGES = \
res/images/splash.png \
res/images/splash_testnet.png
-RES_MOVIES = res/movies/update_spinner.mng
+RES_MOVIES = $(wildcard res/movies/spinner-*.png)
BITCOIN_RC = res/bitcoin-qt-res.rc
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index 3c3220c2b3..746b5a4092 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -47,7 +47,41 @@
<file alias="splash_testnet">res/images/splash_testnet.png</file>
</qresource>
<qresource prefix="/movies">
- <file alias="update_spinner">res/movies/update_spinner.mng</file>
+ <file alias="spinner-000">res/movies/spinner-000.png</file>
+ <file alias="spinner-001">res/movies/spinner-001.png</file>
+ <file alias="spinner-002">res/movies/spinner-002.png</file>
+ <file alias="spinner-003">res/movies/spinner-003.png</file>
+ <file alias="spinner-004">res/movies/spinner-004.png</file>
+ <file alias="spinner-005">res/movies/spinner-005.png</file>
+ <file alias="spinner-006">res/movies/spinner-006.png</file>
+ <file alias="spinner-007">res/movies/spinner-007.png</file>
+ <file alias="spinner-008">res/movies/spinner-008.png</file>
+ <file alias="spinner-009">res/movies/spinner-009.png</file>
+ <file alias="spinner-010">res/movies/spinner-010.png</file>
+ <file alias="spinner-011">res/movies/spinner-011.png</file>
+ <file alias="spinner-012">res/movies/spinner-012.png</file>
+ <file alias="spinner-013">res/movies/spinner-013.png</file>
+ <file alias="spinner-014">res/movies/spinner-014.png</file>
+ <file alias="spinner-015">res/movies/spinner-015.png</file>
+ <file alias="spinner-016">res/movies/spinner-016.png</file>
+ <file alias="spinner-017">res/movies/spinner-017.png</file>
+ <file alias="spinner-018">res/movies/spinner-018.png</file>
+ <file alias="spinner-019">res/movies/spinner-019.png</file>
+ <file alias="spinner-020">res/movies/spinner-020.png</file>
+ <file alias="spinner-021">res/movies/spinner-021.png</file>
+ <file alias="spinner-022">res/movies/spinner-022.png</file>
+ <file alias="spinner-023">res/movies/spinner-023.png</file>
+ <file alias="spinner-024">res/movies/spinner-024.png</file>
+ <file alias="spinner-025">res/movies/spinner-025.png</file>
+ <file alias="spinner-026">res/movies/spinner-026.png</file>
+ <file alias="spinner-027">res/movies/spinner-027.png</file>
+ <file alias="spinner-028">res/movies/spinner-028.png</file>
+ <file alias="spinner-029">res/movies/spinner-029.png</file>
+ <file alias="spinner-030">res/movies/spinner-030.png</file>
+ <file alias="spinner-031">res/movies/spinner-031.png</file>
+ <file alias="spinner-032">res/movies/spinner-032.png</file>
+ <file alias="spinner-033">res/movies/spinner-033.png</file>
+ <file alias="spinner-034">res/movies/spinner-034.png</file>
</qresource>
<qresource prefix="/translations">
<file alias="ach">locale/bitcoin_ach.qm</file>
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
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 1038e2739c..d5bbdca484 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -98,9 +98,9 @@ private:
Notificator *notificator;
RPCConsole *rpcConsole;
- QMovie *syncIconMovie;
/** Keep track of previous number of blocks, to detect progress */
int prevBlocks;
+ int spinnerFrame;
/** Create the main UI actions. */
void createActions(bool fIsTestnet);
diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index 6c9fa6a755..d1a601706b 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -38,4 +38,7 @@ static const int MAX_PAYMENT_REQUEST_SIZE = 50000; // bytes
/* QRCodeDialog -- size of exported QR Code image */
#define EXPORT_IMAGE_SIZE 256
+/* Number of frames in spinner animation */
+#define SPINNER_FRAMES 35
+
#endif // GUICONSTANTS_H
diff --git a/src/qt/res/movies/spinner-000.png b/src/qt/res/movies/spinner-000.png
new file mode 100644
index 0000000000..1f4fb732ef
--- /dev/null
+++ b/src/qt/res/movies/spinner-000.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-001.png b/src/qt/res/movies/spinner-001.png
new file mode 100644
index 0000000000..e6ca67a1b0
--- /dev/null
+++ b/src/qt/res/movies/spinner-001.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-002.png b/src/qt/res/movies/spinner-002.png
new file mode 100644
index 0000000000..2360467aff
--- /dev/null
+++ b/src/qt/res/movies/spinner-002.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-003.png b/src/qt/res/movies/spinner-003.png
new file mode 100644
index 0000000000..52bed62566
--- /dev/null
+++ b/src/qt/res/movies/spinner-003.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-004.png b/src/qt/res/movies/spinner-004.png
new file mode 100644
index 0000000000..de5c88a56f
--- /dev/null
+++ b/src/qt/res/movies/spinner-004.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-005.png b/src/qt/res/movies/spinner-005.png
new file mode 100644
index 0000000000..27b30336a1
--- /dev/null
+++ b/src/qt/res/movies/spinner-005.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-006.png b/src/qt/res/movies/spinner-006.png
new file mode 100644
index 0000000000..1fa6b0e242
--- /dev/null
+++ b/src/qt/res/movies/spinner-006.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-007.png b/src/qt/res/movies/spinner-007.png
new file mode 100644
index 0000000000..f54fa8775e
--- /dev/null
+++ b/src/qt/res/movies/spinner-007.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-008.png b/src/qt/res/movies/spinner-008.png
new file mode 100644
index 0000000000..d25aa5300f
--- /dev/null
+++ b/src/qt/res/movies/spinner-008.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-009.png b/src/qt/res/movies/spinner-009.png
new file mode 100644
index 0000000000..1349b87586
--- /dev/null
+++ b/src/qt/res/movies/spinner-009.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-010.png b/src/qt/res/movies/spinner-010.png
new file mode 100644
index 0000000000..6020e275f1
--- /dev/null
+++ b/src/qt/res/movies/spinner-010.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-011.png b/src/qt/res/movies/spinner-011.png
new file mode 100644
index 0000000000..0d0e811ea7
--- /dev/null
+++ b/src/qt/res/movies/spinner-011.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-012.png b/src/qt/res/movies/spinner-012.png
new file mode 100644
index 0000000000..937afb6be2
--- /dev/null
+++ b/src/qt/res/movies/spinner-012.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-013.png b/src/qt/res/movies/spinner-013.png
new file mode 100644
index 0000000000..4ae5a671a3
--- /dev/null
+++ b/src/qt/res/movies/spinner-013.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-014.png b/src/qt/res/movies/spinner-014.png
new file mode 100644
index 0000000000..c3a81add0e
--- /dev/null
+++ b/src/qt/res/movies/spinner-014.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-015.png b/src/qt/res/movies/spinner-015.png
new file mode 100644
index 0000000000..184a9fe424
--- /dev/null
+++ b/src/qt/res/movies/spinner-015.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-016.png b/src/qt/res/movies/spinner-016.png
new file mode 100644
index 0000000000..2da9b9dc72
--- /dev/null
+++ b/src/qt/res/movies/spinner-016.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-017.png b/src/qt/res/movies/spinner-017.png
new file mode 100644
index 0000000000..ada83fbe84
--- /dev/null
+++ b/src/qt/res/movies/spinner-017.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-018.png b/src/qt/res/movies/spinner-018.png
new file mode 100644
index 0000000000..cc436ba8cb
--- /dev/null
+++ b/src/qt/res/movies/spinner-018.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-019.png b/src/qt/res/movies/spinner-019.png
new file mode 100644
index 0000000000..03da25bc2a
--- /dev/null
+++ b/src/qt/res/movies/spinner-019.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-020.png b/src/qt/res/movies/spinner-020.png
new file mode 100644
index 0000000000..e7f2ac78e8
--- /dev/null
+++ b/src/qt/res/movies/spinner-020.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-021.png b/src/qt/res/movies/spinner-021.png
new file mode 100644
index 0000000000..dc9e580bf3
--- /dev/null
+++ b/src/qt/res/movies/spinner-021.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-022.png b/src/qt/res/movies/spinner-022.png
new file mode 100644
index 0000000000..6e236c805e
--- /dev/null
+++ b/src/qt/res/movies/spinner-022.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-023.png b/src/qt/res/movies/spinner-023.png
new file mode 100644
index 0000000000..f1c3228485
--- /dev/null
+++ b/src/qt/res/movies/spinner-023.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-024.png b/src/qt/res/movies/spinner-024.png
new file mode 100644
index 0000000000..d8cf21f178
--- /dev/null
+++ b/src/qt/res/movies/spinner-024.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-025.png b/src/qt/res/movies/spinner-025.png
new file mode 100644
index 0000000000..2b5ede3293
--- /dev/null
+++ b/src/qt/res/movies/spinner-025.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-026.png b/src/qt/res/movies/spinner-026.png
new file mode 100644
index 0000000000..5ee3d2fa8e
--- /dev/null
+++ b/src/qt/res/movies/spinner-026.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-027.png b/src/qt/res/movies/spinner-027.png
new file mode 100644
index 0000000000..c2ee8082bd
--- /dev/null
+++ b/src/qt/res/movies/spinner-027.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-028.png b/src/qt/res/movies/spinner-028.png
new file mode 100644
index 0000000000..f70d3531ad
--- /dev/null
+++ b/src/qt/res/movies/spinner-028.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-029.png b/src/qt/res/movies/spinner-029.png
new file mode 100644
index 0000000000..02b97207a9
--- /dev/null
+++ b/src/qt/res/movies/spinner-029.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-030.png b/src/qt/res/movies/spinner-030.png
new file mode 100644
index 0000000000..0c74e82c6f
--- /dev/null
+++ b/src/qt/res/movies/spinner-030.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-031.png b/src/qt/res/movies/spinner-031.png
new file mode 100644
index 0000000000..c5e29bcec7
--- /dev/null
+++ b/src/qt/res/movies/spinner-031.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-032.png b/src/qt/res/movies/spinner-032.png
new file mode 100644
index 0000000000..d72c9bf0dd
--- /dev/null
+++ b/src/qt/res/movies/spinner-032.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-033.png b/src/qt/res/movies/spinner-033.png
new file mode 100644
index 0000000000..a8b822bfaf
--- /dev/null
+++ b/src/qt/res/movies/spinner-033.png
Binary files differ
diff --git a/src/qt/res/movies/spinner-034.png b/src/qt/res/movies/spinner-034.png
new file mode 100644
index 0000000000..684aa385e0
--- /dev/null
+++ b/src/qt/res/movies/spinner-034.png
Binary files differ
diff --git a/src/qt/res/movies/update_spinner.mng b/src/qt/res/movies/update_spinner.mng
deleted file mode 100644
index 7df3baac6f..0000000000
--- a/src/qt/res/movies/update_spinner.mng
+++ /dev/null
Binary files differ