aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/toys/dynamicscene/content
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-01-19 15:59:59 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-27 02:23:18 +0100
commita15e6415e44f113414eab17beaafd01b06ce4e3d (patch)
tree79ff04ba771d0d209cf6375d1b0bc81402083e0b /examples/declarative/toys/dynamicscene/content
parente490a021ffe6be39e5942e57aa82f02977efe72d (diff)
Svelte new form for dynamic scene example
Change-Id: Ic6a3616ea06c8085e6ccd7e3e13566f36aadcc0f Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'examples/declarative/toys/dynamicscene/content')
-rw-r--r--examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml2
-rw-r--r--examples/declarative/toys/dynamicscene/content/Sun.qml4
-rw-r--r--examples/declarative/toys/dynamicscene/content/itemCreation.js2
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml b/examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml
index f3e0bb8361..33d4a38a91 100644
--- a/examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml
+++ b/examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml
@@ -47,7 +47,7 @@ Image {
property string image
property double scaledBottom: y + (height + height*scale) / 2
- property bool onLand: scaledBottom > window.height / 2
+ property bool onLand: scaledBottom > (window.height / 2 + window.centerOffset)
source: image
opacity: onLand ? 1 : 0.25
diff --git a/examples/declarative/toys/dynamicscene/content/Sun.qml b/examples/declarative/toys/dynamicscene/content/Sun.qml
index 7c41ba2a69..4652829936 100644
--- a/examples/declarative/toys/dynamicscene/content/Sun.qml
+++ b/examples/declarative/toys/dynamicscene/content/Sun.qml
@@ -50,11 +50,11 @@ Image {
// once item is created, start moving offscreen
NumberAnimation on y {
- to: window.height / 2
+ to: (window.height / 2) + window.centerOffset
running: created
onRunningChanged: {
if (running)
- duration = (window.height - sun.y) * 10;
+ duration = (window.height + window.centerOffset - sun.y) * 10;
else
state = "OffScreen"
}
diff --git a/examples/declarative/toys/dynamicscene/content/itemCreation.js b/examples/declarative/toys/dynamicscene/content/itemCreation.js
index 4ee74c28c1..40f5415f9f 100644
--- a/examples/declarative/toys/dynamicscene/content/itemCreation.js
+++ b/examples/declarative/toys/dynamicscene/content/itemCreation.js
@@ -51,7 +51,7 @@ function endDrag(mouse)
if (draggedItem == null)
return;
- if (draggedItem.x + draggedItem.width > toolbox.x) { //Don't drop it in the toolbox
+ if (draggedItem.y < toolbox.height) { //Don't drop it in the toolbox
draggedItem.destroy();
draggedItem = null;
} else {