diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-21 05:37:41 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-22 01:22:35 (GMT) |
commit | c8968fd143e079d4d2b79c88132caaffbefedd7d (patch) | |
tree | b16577cba1077738e8095c0ddb8faca20a17b1fb /examples/declarative/ui-components/slideswitch | |
parent | d9e49c4399e506c878ce5125d4edcf384b867b26 (diff) | |
download | Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.zip Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.tar.gz Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.tar.bz2 |
Clean up some examples
Diffstat (limited to 'examples/declarative/ui-components/slideswitch')
-rw-r--r-- | examples/declarative/ui-components/slideswitch/content/Switch.qml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/declarative/ui-components/slideswitch/content/Switch.qml b/examples/declarative/ui-components/slideswitch/content/Switch.qml index b0ce0c0..2a89177 100644 --- a/examples/declarative/ui-components/slideswitch/content/Switch.qml +++ b/examples/declarative/ui-components/slideswitch/content/Switch.qml @@ -53,12 +53,13 @@ Item { function toggle() { if (toggleswitch.state == "on") toggleswitch.state = "off"; - else toggleswitch.state = "on"; + else + toggleswitch.state = "on"; } //![2] //![3] - function dorelease() { + function releaseSwitch() { if (knob.x == 1) { if (toggleswitch.state == "off") return; } @@ -87,7 +88,7 @@ Item { anchors.fill: parent drag.target: knob; drag.axis: Drag.XAxis; drag.minimumX: 1; drag.maximumX: 78 onClicked: toggle() - onReleased: dorelease() + onReleased: releaseSwitch() } } //![5] |