summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/common/ScrollBar.qml
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-08-25 22:57:29 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-08-25 22:57:29 (GMT)
commit314c6ec54e4cb4e2ec936ada7e0a112a60b87832 (patch)
treea5444e7cae8d40eb549b70dd4473057f6b3cda09 /demos/declarative/flickr/common/ScrollBar.qml
parent8e580cebef7128666017ba39d41aa620a1d2eddf (diff)
parent0094735947164aef8f8e6539c535199b29ed6f4e (diff)
downloadQt-314c6ec54e4cb4e2ec936ada7e0a112a60b87832.zip
Qt-314c6ec54e4cb4e2ec936ada7e0a112a60b87832.tar.gz
Qt-314c6ec54e4cb4e2ec936ada7e0a112a60b87832.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'demos/declarative/flickr/common/ScrollBar.qml')
-rw-r--r--demos/declarative/flickr/common/ScrollBar.qml40
1 files changed, 40 insertions, 0 deletions
diff --git a/demos/declarative/flickr/common/ScrollBar.qml b/demos/declarative/flickr/common/ScrollBar.qml
new file mode 100644
index 0000000..89d51e2
--- /dev/null
+++ b/demos/declarative/flickr/common/ScrollBar.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Item {
+ id: Container
+
+ property var flickableArea
+
+ Rectangle {
+ radius: 5
+ color: "black"
+ opacity: 0.3
+ border.color: "white"
+ border.width: 2
+ x: 0
+ y: flickableArea.pageYPosition * Container.height
+ width: parent.width
+ height: flickableArea.pageHeight * Container.height
+ }
+ states: [
+ State {
+ name: "show"
+ when: flickableArea.moving
+ PropertyChanges {
+ target: Container
+ opacity: 1
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "*"
+ to: "*"
+ NumberAnimation {
+ target: Container
+ properties: "opacity"
+ duration: 400
+ }
+ }
+ ]
+}