[Pkg-privacy-commits] [tails-installer] 12/27: Added an adwaita busy indicator

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:59 UTC 2017


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

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

commit f1bd61534f7ce7ad481f6c2dcf84eaa026b3133a
Author: Martin Briza <mbriza at redhat.com>
Date:   Fri Mar 11 10:31:15 2016 +0100

    Added an adwaita busy indicator
---
 liveusb/components/AdwaitaBusyIndicator.qml | 82 +++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/liveusb/components/AdwaitaBusyIndicator.qml b/liveusb/components/AdwaitaBusyIndicator.qml
new file mode 100644
index 0000000..ffed273
--- /dev/null
+++ b/liveusb/components/AdwaitaBusyIndicator.qml
@@ -0,0 +1,82 @@
+import QtQuick 2.0
+import QtQuick.Controls 1.2
+import QtQuick.Controls.Styles 1.2
+
+BusyIndicator {
+    id: root
+    width: $(148)
+    height: $(6)
+    property color progressColor: "#54aada"
+    property color backgroundColor: "#c3c3c3"
+
+    onRunningChanged: {
+        if (running) {
+            flyingAnimation.stop()
+            flyingBar.x = 0
+        }
+        else {
+            flyingAnimation.start()
+        }
+    }
+
+    Rectangle {
+        implicitWidth: root.width
+        width: root.width
+        height: root.height
+        border {
+            color: "#777777"
+            width: $(1)
+        }
+        radius: $(3)
+        clip: false
+        gradient: Gradient {
+            GradientStop { position: 0.0; color: Qt.lighter(root.backgroundColor, 1.05) }
+            GradientStop { position: 1.0; color: Qt.darker(root.backgroundColor, 1.05) }
+        }
+        Rectangle {
+            id: flyingBar
+            width: $(32)
+            height: root.height - $(2)
+            y: $(1)
+            radius: $(3)
+            border {
+                color: "#777777"
+                width: $(1)
+            }
+            opacity: root.running ? 1.0 : 0.0
+            Behavior on opacity { NumberAnimation { } }
+            gradient: Gradient {
+                GradientStop { position: 0.0; color: Qt.lighter(root.progressColor, 1.05) }
+                GradientStop { position: 0.9; color: root.progressColor }
+                GradientStop { position: 1.0; color: Qt.darker(root.progressColor) }
+            }
+            SequentialAnimation {
+                id: flyingAnimation
+                running: root.running
+                loops: Animation.Infinite
+                NumberAnimation {
+                    duration: 1000
+                    target: flyingBar
+                    easing.type: Easing.InOutCubic
+                    property: "x"
+                    from: $(1)
+                    to: root.width - flyingBar.width
+                }
+                NumberAnimation {
+                    duration: 1000
+                    target: flyingBar
+                    easing.type: Easing.InOutCubic
+                    property: "x"
+                    from: root.width - flyingBar.width
+                    to: $(1)
+                }
+            }
+        }
+    }
+
+    // this style is completely useless, let's just implement it outside
+    style: BusyIndicatorStyle {
+        indicator: Item {
+        }
+    }
+}

-- 
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