aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-13 14:16:48 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-13 14:45:23 +0100
commitf10b2d70d09c2e9f5c14ba5e3673c5fb31aa9468 (patch)
tree72b26aeba1b3bb47636ffe8e2ece85fc0c44c214 /share
parenta7973c9b6b6c72bca2e6e90aed08553bf708938d (diff)
qt: use series of pngs for spinner
Use a series of .png frames for the spinner instead of a .mng. `mng` is an obscure image format and is not built by default into Qt5. This appears to improve the crispness of the spinner as well. Does not noticably increase the size (still ~27k) and the code is not more complicated either.
Diffstat (limited to 'share')
-rw-r--r--share/qt/img/reload.pngbin0 -> 9886 bytes
-rwxr-xr-xshare/qt/make_spinner.py13
2 files changed, 4 insertions, 9 deletions
diff --git a/share/qt/img/reload.png b/share/qt/img/reload.png
new file mode 100644
index 0000000000..9068db9a63
--- /dev/null
+++ b/share/qt/img/reload.png
Binary files differ
diff --git a/share/qt/make_spinner.py b/share/qt/make_spinner.py
index 136aff3cb7..bb19e91508 100755
--- a/share/qt/make_spinner.py
+++ b/share/qt/make_spinner.py
@@ -1,16 +1,15 @@
#!/usr/bin/env python
# W.J. van der Laan, 2011
-# Make spinning .mng animation from a .png
+# Make spinning animation from a .png
# Requires imagemagick 6.7+
from __future__ import division
from os import path
from PIL import Image
from subprocess import Popen
-SRC='img/reload_scaled.png'
-DST='../../src/qt/res/movies/update_spinner.mng'
-TMPDIR='/tmp'
-TMPNAME='tmp-%03i.png'
+SRC='img/reload.png'
+TMPDIR='../../src/qt/res/movies/'
+TMPNAME='spinner-%03i.png'
NUMFRAMES=35
FRAMERATE=10.0
CONVERT='convert'
@@ -36,8 +35,4 @@ for frame in xrange(NUMFRAMES):
im_new.save(outfile, 'png')
frame_files.append(outfile)
-p = Popen([CONVERT, "-delay", str(FRAMERATE), "-dispose", "2"] + frame_files + [DST])
-p.communicate()
-
-