summaryrefslogtreecommitdiffstats
path: root/examples/declarative/clocks
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-10-30 04:17:51 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-10-30 04:17:51 (GMT)
commitd6a5e635a1605820571f83b375377d7d5dcb8968 (patch)
treee894befb2f1b42ee0240ec3bcf43ca56000fcee5 /examples/declarative/clocks
parentd788c0127b86d8245aa0a8e2472562f444d98ee9 (diff)
downloadQt-d6a5e635a1605820571f83b375377d7d5dcb8968.zip
Qt-d6a5e635a1605820571f83b375377d7d5dcb8968.tar.gz
Qt-d6a5e635a1605820571f83b375377d7d5dcb8968.tar.bz2
fix parallax example
Diffstat (limited to 'examples/declarative/clocks')
-rw-r--r--examples/declarative/clocks/content/Clock.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml
index 4e9984f..2aac5f1 100644
--- a/examples/declarative/clocks/content/Clock.qml
+++ b/examples/declarative/clocks/content/Clock.qml
@@ -12,13 +12,13 @@ Item {
function timeChanged() {
var date = new Date;
- hours = date.getUTCHours() + Math.floor(clock.shift)
- minutes = date.getUTCMinutes() + ((clock.shift % 1) * 60);
+ hours = shift ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours()
+ minutes = shift ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
seconds = date.getUTCSeconds();
}
Timer {
- interval: 1000; running: true; repeat: true; triggeredOnStart: true
+ interval: 100; running: true; repeat: true; triggeredOnStart: true
onTriggered: clock.timeChanged()
}