From d6a5e635a1605820571f83b375377d7d5dcb8968 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 30 Oct 2009 14:17:51 +1000 Subject: fix parallax example --- examples/declarative/clocks/content/Clock.qml | 6 +++--- examples/declarative/parallax/parallax.qml | 6 ++---- 2 files changed, 5 insertions(+), 7 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() } diff --git a/examples/declarative/parallax/parallax.qml b/examples/declarative/parallax/parallax.qml index 52bd210..e3a7d93 100644 --- a/examples/declarative/parallax/parallax.qml +++ b/examples/declarative/parallax/parallax.qml @@ -1,5 +1,5 @@ import Qt 4.6 -import "../clock" +import "../clocks/content" Rectangle { id: root @@ -17,9 +17,7 @@ Rectangle { width: 320 height: 480 - Clock { - anchors.centerIn: parent - } + Clock { anchors.centerIn: parent } } Item { -- cgit v0.12