summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/content/Progress.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/flickr/content/Progress.qml')
-rw-r--r--demos/declarative/flickr/content/Progress.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/demos/declarative/flickr/content/Progress.qml b/demos/declarative/flickr/content/Progress.qml
new file mode 100644
index 0000000..92a232e
--- /dev/null
+++ b/demos/declarative/flickr/content/Progress.qml
@@ -0,0 +1,25 @@
+Item {
+ id: Progress;
+
+ property var progress: 0
+
+ Rect {
+ id: Container; anchors.fill: parent; gradientColor: "#66000000";
+ pen.color: "white"; pen.width: 1; color: "#66343434"; radius: height/2 - 2
+ }
+
+ Rect {
+ id: Fill
+ y: 2; height: parent.height-4;
+ x: 2; width: Math.max(parent.width * progress - 4, 0);
+ opacity: width < 1 ? 0 : 1
+ color: "lightsteelblue"; gradientColor: "steelblue"; radius: height/2 - 2
+ }
+
+ Text {
+ text: Math.round(progress * 100) + "%"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ color: "white"; font.bold: true
+ }
+}