From 6f665b568b5234d07e8ea709026f4b11bf0c09f0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 7 May 2009 14:42:35 +1000 Subject: Forgot progress bar. --- demos/declarative/flickr/content/Progress.qml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 demos/declarative/flickr/content/Progress.qml 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 + } +} -- cgit v0.12