diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-09-21 07:32:22 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-09-21 07:32:36 (GMT) |
commit | 37ba2e1140c62ac0123479b3d1a7f2638f095e20 (patch) | |
tree | 72d7b47683655577875a1fdb23b81deb0e9017f9 /examples/declarative/toys/corkboards | |
parent | 8b97765d6e7cf207fb3a5ea8ac4fc5adbbcd3610 (diff) | |
download | Qt-37ba2e1140c62ac0123479b3d1a7f2638f095e20.zip Qt-37ba2e1140c62ac0123479b3d1a7f2638f095e20.tar.gz Qt-37ba2e1140c62ac0123479b3d1a7f2638f095e20.tar.bz2 |
Fix corkboards example for smaller screens
Task-number:
Reviewed-by: Martin Jones
Diffstat (limited to 'examples/declarative/toys/corkboards')
-rw-r--r-- | examples/declarative/toys/corkboards/Day.qml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/examples/declarative/toys/corkboards/Day.qml b/examples/declarative/toys/corkboards/Day.qml index f406f7b..3525a5b 100644 --- a/examples/declarative/toys/corkboards/Day.qml +++ b/examples/declarative/toys/corkboards/Day.qml @@ -45,9 +45,16 @@ Component { property variant stickies id: page - width: 840; height: 480 + width: ListView.view.width+40; height: ListView.view.height - Image { source: "cork.jpg" } + + Image { + source: "cork.jpg" + width: page.ListView.view.width + height: page.ListView.view.height + fillMode: Image.PreserveAspectCrop + clip: true + } MouseArea { anchors.fill: parent @@ -65,8 +72,8 @@ Component { Item { id: stickyPage - property int randomX: Math.random() * 500 + 100 - property int randomY: Math.random() * 200 + 50 + property int randomX: Math.random() * (page.ListView.view.width-0.5*stickyImage.width) +100 + property int randomY: Math.random() * (page.ListView.view.height-0.5*stickyImage.height) +50 x: randomX; y: randomY |