[Pkg-privacy-commits] [tails-installer] 05/13: Add a little animation to show the list update

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:28:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.95.0
in repository tails-installer.

commit 0cbbb269b84ac23bbb6d40898c17f2493a49e155
Author: Martin Briza <mbriza at redhat.com>
Date:   Tue Apr 26 12:44:55 2016 +0200

    Add a little animation to show the list update
---
 liveusb/components/ImageList.qml | 29 ++++++++++++++++++++++-------
 liveusb/gui.py                   |  2 ++
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/liveusb/components/ImageList.qml b/liveusb/components/ImageList.qml
index a6db14d..9a61cbc 100644
--- a/liveusb/components/ImageList.qml
+++ b/liveusb/components/ImageList.qml
@@ -228,15 +228,30 @@ Item {
                         opacity: hidden ? 0.0 : 1.0
                         Behavior on opacity { NumberAnimation { duration: 60 } }
                         anchors.centerIn: parent
-                        spacing: $(2)
-                        Repeater {
-                            model: 3
-                            Rectangle {
-                                height: $(4)
-                                width: $(4)
-                                color: "#bebebe"
+                        spacing: $(3)
+                        Rectangle { id: dot1; height: $(4); width: $(4); radius: $(1); color: "#bebebe"; antialiasing: true }
+                        Rectangle { id: dot2; height: $(4); width: $(4); radius: $(1); color: "#bebebe"; antialiasing: true }
+                        Rectangle { id: dot3; height: $(4); width: $(4); radius: $(1); color: "#bebebe"; antialiasing: true }
+                        SequentialAnimation {
+                            id: updateAnimation
+                            running: true
+                            loops: -1
+                            NumberAnimation { target: dot1; property: "scale"; from: 1.0; to: 1.5; duration: 300 }
+                            NumberAnimation { target: dot1; property: "scale"; from: 1.5; to: 1.0; duration: 300 }
+                            NumberAnimation { target: dot2; property: "scale"; from: 1.0; to: 1.5; duration: 300 }
+                            NumberAnimation { target: dot2; property: "scale"; from: 1.5; to: 1.0; duration: 300 }
+                            NumberAnimation { target: dot3; property: "scale"; from: 1.0; to: 1.5; duration: 300 }
+                            NumberAnimation { target: dot3; property: "scale"; from: 1.5; to: 1.0; duration: 300 }
+                            onStopped: {
+                                dot1.scale = 1.0
+                                dot2.scale = 1.0
+                                dot3.scale = 1.0
                             }
                         }
+                        Connections {
+                            target: liveUSBData
+                            onUpdateThreadStopped: updateAnimation.running = false
+                        }
                     }
                     Text {
                         id: threeDotText
diff --git a/liveusb/gui.py b/liveusb/gui.py
index e5cc9dc..ad52762 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -679,6 +679,7 @@ class LiveUSBData(QObject):
     usbDrivesChanged = pyqtSignal()
     currentDriveChanged = pyqtSignal()
     driveToRestoreChanged = pyqtSignal()
+    updateThreadStopped = pyqtSignal()
 
     # has to be a property because you can't pass python signal parameters to qml
     _driveToRestore = None
@@ -700,6 +701,7 @@ class LiveUSBData(QObject):
         self.live.detect_removable_drives(callback=self.USBDeviceCallback)
 
         self.updateThread.finished.connect(self.fillReleases)
+        self.updateThread.finished.connect(self.updateThreadStopped)
         QTimer.singleShot(0, self.updateThread.start)
 
     @pyqtSlot()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list