summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/content/ScrollBar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/flickr/content/ScrollBar.qml')
-rw-r--r--demos/declarative/flickr/content/ScrollBar.qml38
1 files changed, 38 insertions, 0 deletions
diff --git a/demos/declarative/flickr/content/ScrollBar.qml b/demos/declarative/flickr/content/ScrollBar.qml
new file mode 100644
index 0000000..2c4ff54
--- /dev/null
+++ b/demos/declarative/flickr/content/ScrollBar.qml
@@ -0,0 +1,38 @@
+Item {
+ id: Container
+
+ property var flickableArea
+
+ Rect {
+ radius: 5
+ color: "black"
+ opacity: 0.3
+ pen.color: "white"
+ pen.width: 2
+ x: 0
+ y: flickableArea.pageYPosition * Container.height
+ width: parent.width
+ height: flickableArea.pageHeight * Container.height
+ }
+ states: [
+ State {
+ name: "show"
+ when: flickableArea.moving
+ SetProperties {
+ target: Container
+ opacity: 1
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ fromState: "*"
+ toState: "*"
+ NumericAnimation {
+ target: Container
+ properties: "opacity"
+ duration: 400
+ }
+ }
+ ]
+}