From 94d6694a7b91f3ea5a8649f13a68a907e2bc95f3 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 4 Oct 2021 18:00:55 +0200 Subject: [ui] first attempt at animated birds --- gui/components/StatusBox.qml | 8 +++++++- gui/components/VPNState.qml | 4 ++-- gui/gui.qrc | 1 + gui/resources/ravens.gif | Bin 0 -> 1904 bytes 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 gui/resources/ravens.gif (limited to 'gui') 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 @@ resources/arrow-left.svg resources/globe.svg resources/ravens.svg + resources/ravens.gif resources/riseup-icon.svg resources/spy.gif resources/quit.svg diff --git a/gui/resources/ravens.gif b/gui/resources/ravens.gif new file mode 100644 index 0000000..ead3676 Binary files /dev/null and b/gui/resources/ravens.gif differ -- cgit v1.2.3