From 271904ca7806abfe3c4a9004831658803e18737c Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 25 Aug 2009 14:17:22 +1000 Subject: Dialog width is dependent on text --- demos/declarative/samegame/content/Dialog.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml index a3c5f33..72c7900 100644 --- a/demos/declarative/samegame/content/Dialog.qml +++ b/demos/declarative/samegame/content/Dialog.qml @@ -2,7 +2,7 @@ import Qt 4.6 Rectangle { id: page - color: "white"; border.width: 1; width: 200; height: 60; + color: "white"; border.width: 1; width: MyText.width + 20; height: 60; property string text: "Hello World!" opacity: 0 opacity: Behavior { @@ -11,5 +11,5 @@ Rectangle { NumberAnimation {property: "opacity"; to: 0; duration: 1500 } } } - Text { anchors.centerIn: parent; text: parent.text } + Text { id: MyText; anchors.centerIn: parent; text: parent.text } } -- cgit v0.12 From d6f0db181ab35250ee53c9b9d0210a80c69382ac Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 25 Aug 2009 14:29:54 +1000 Subject: Remove excessive margins in SameGame Reviewed-by: Yann Bodson --- demos/declarative/samegame/SameGame.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/declarative/samegame/SameGame.qml b/demos/declarative/samegame/SameGame.qml index a9d8140..c0a1b2a 100644 --- a/demos/declarative/samegame/SameGame.qml +++ b/demos/declarative/samegame/SameGame.qml @@ -3,7 +3,7 @@ import "content" Rectangle { id: Screen - width: 460; height: 700 + width: 490; height: 720 Script { source: "content/samegame.js" } @@ -23,8 +23,8 @@ Rectangle { property int score: 0 z: 20; anchors.centerIn: parent - width: parent.width - tileSize - (parent.width % tileSize); - height: parent.height - tileSize - (parent.height % tileSize); + width: parent.width - (parent.width % tileSize); + height: parent.height - (parent.height % tileSize); MouseRegion { id: gameMR -- cgit v0.12