diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-10-06 02:28:42 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-10-06 02:28:42 (GMT) |
commit | c3abf1a4ae82a57bbc6cc324fa6f9a99615ab066 (patch) | |
tree | 34beb32ce99c5b8e23ae506756ed4ad6590c87db /demos/declarative/flickr/common/Slider.qml | |
parent | dab7f1079a40a1beb5555c8ffaaf8b2c73781596 (diff) | |
download | Qt-c3abf1a4ae82a57bbc6cc324fa6f9a99615ab066.zip Qt-c3abf1a4ae82a57bbc6cc324fa6f9a99615ab066.tar.gz Qt-c3abf1a4ae82a57bbc6cc324fa6f9a99615ab066.tar.bz2 |
lowercase ids
Diffstat (limited to 'demos/declarative/flickr/common/Slider.qml')
-rw-r--r-- | demos/declarative/flickr/common/Slider.qml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/demos/declarative/flickr/common/Slider.qml b/demos/declarative/flickr/common/Slider.qml index b88636d..fa1645c 100644 --- a/demos/declarative/flickr/common/Slider.qml +++ b/demos/declarative/flickr/common/Slider.qml @@ -1,17 +1,17 @@ import Qt 4.6 Item { - id: Slider; width: 400; height: 16 + id: slider; width: 400; height: 16 // value is read/write. property real value - onValueChanged: { Handle.x = 2 + (value - minimum) * Slider.xMax / (maximum - minimum); } + onValueChanged: { handle.x = 2 + (value - minimum) * slider.xMax / (maximum - minimum); } property real maximum: 1 property real minimum: 1 - property int xMax: Slider.width - Handle.width - 4 + property int xMax: slider.width - handle.width - 4 Rectangle { - id: Container; anchors.fill: parent + anchors.fill: parent border.color: "white"; border.width: 0; radius: 8 gradient: Gradient { GradientStop { position: 0.0; color: "#66343434" } @@ -20,8 +20,8 @@ Item { } Rectangle { - id: Handle; smooth: true - x: Slider.width / 2 - Handle.width / 2; y: 2; width: 30; height: Slider.height-4; radius: 6 + id: handle; smooth: true + x: slider.width / 2 - handle.width / 2; y: 2; width: 30; height: slider.height-4; radius: 6 gradient: Gradient { GradientStop { position: 0.0; color: "lightgray" } GradientStop { position: 1.0; color: "gray" } @@ -29,8 +29,8 @@ Item { MouseRegion { anchors.fill: parent; drag.target: parent - drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: Slider.xMax+2 - onPositionChanged: { value = (maximum - minimum) * (Handle.x-2) / Slider.xMax + minimum; } + drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: slider.xMax+2 + onPositionChanged: { value = (maximum - minimum) * (handle.x-2) / slider.xMax + minimum; } } } } |