summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/common/ScrollBar.qml
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-25 01:20:08 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-25 01:20:08 (GMT)
commit7f41d39c293e1bd013acc0e79af2aa66e1f9e4d0 (patch)
tree01569d474f4eee0a097fdb4a5be8b39a09399f52 /demos/declarative/flickr/common/ScrollBar.qml
parente1081c88616fea20fed343e258c98da2a669d9f1 (diff)
downloadQt-7f41d39c293e1bd013acc0e79af2aa66e1f9e4d0.zip
Qt-7f41d39c293e1bd013acc0e79af2aa66e1f9e4d0.tar.gz
Qt-7f41d39c293e1bd013acc0e79af2aa66e1f9e4d0.tar.bz2
Mobile version of Flickr demo in flickr-mobile.qml.
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
+ }
+ }
+ ]
+}