summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-10-04 18:00:55 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-10-06 18:38:22 +0200
commit2e1790104b5ff2f8fe0c1c6837148cc25abcab7a (patch)
treef486c554e971ee200dbce4bb846c5f88138792e4
parent5ff2eb132351f5a289e177300c9472af0616c550 (diff)
[ui] first attempt at animated birds
-rw-r--r--gui/components/StatusBox.qml8
-rw-r--r--gui/components/VPNState.qml4
-rw-r--r--gui/gui.qrc1
-rw-r--r--gui/resources/ravens.gifbin0 -> 1904 bytes
4 files changed, 10 insertions, 3 deletions
diff --git a/gui/components/StatusBox.qml b/gui/components/StatusBox.qml
index 00d0c2d..15eef2e 100644
--- a/gui/components/StatusBox.qml
+++ b/gui/components/StatusBox.qml
@@ -100,13 +100,19 @@ Item {
height: 120
}
- Image {
+ AnimatedImage {
id: connectionImage
height: 160
+ speed: 0.8
source: "../resources/icon-noshield.svg"
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
+ onStatusChanged: playing = (status == AnimatedImage.Ready)
}
+ // TODO this can be synced with opacity serial animation, see
+ // https://doc.qt.io/qt-5/qml-qtquick-animatedimage.html#example-usage
+ // If you want to customize your asset, here's how:
+ // convert -delay 50 -loop 0 ravens2_*.png ravens.gif
VerticalSpacer {
id: spacerPostImg
diff --git a/gui/components/VPNState.qml b/gui/components/VPNState.qml
index 64a109a..e85d8e9 100644
--- a/gui/components/VPNState.qml
+++ b/gui/components/VPNState.qml
@@ -31,7 +31,7 @@ StateGroup {
}
PropertyChanges {
target: connectionImage
- source: "../resources/ravens.svg"
+ source: "../resources/ravens.gif"
anchors.horizontalCenter: parent.horizontalCenter
}
PropertyChanges {
@@ -130,7 +130,7 @@ StateGroup {
}
PropertyChanges {
target: connectionImage
- source: "../resources/ravens.svg"
+ source: "../resources/ravens.gif"
anchors.horizontalCenter: parent.horizontalCenter
}
PropertyChanges {
diff --git a/gui/gui.qrc b/gui/gui.qrc
index 78be7bc..cb2ad41 100644
--- a/gui/gui.qrc
+++ b/gui/gui.qrc
@@ -53,6 +53,7 @@
<file>resources/arrow-left.svg</file>
<file>resources/globe.svg</file>
<file>resources/ravens.svg</file>
+ <file>resources/ravens.gif</file>
<file>resources/riseup-icon.svg</file>
<file>resources/spy.gif</file>
<file>resources/quit.svg</file>
diff --git a/gui/resources/ravens.gif b/gui/resources/ravens.gif
new file mode 100644
index 0000000..ead3676
--- /dev/null
+++ b/gui/resources/ravens.gif
Binary files differ