diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-08-26 03:46:01 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-08-26 03:46:01 (GMT) |
commit | b4116c58cacc46732ff24db1ea8bf082fcb4b489 (patch) | |
tree | bd3962cb9bc7825341dc20f604bb9e85a2ad255f /demos/declarative | |
parent | 407e131dfc2f85518e42be6ca7a2b43946d0413c (diff) | |
download | Qt-b4116c58cacc46732ff24db1ea8bf082fcb4b489.zip Qt-b4116c58cacc46732ff24db1ea8bf082fcb4b489.tar.gz Qt-b4116c58cacc46732ff24db1ea8bf082fcb4b489.tar.bz2 |
Maintain high score name dialog length, as well as name.
Task-number: QTBUG-13129
Diffstat (limited to 'demos/declarative')
-rwxr-xr-x | demos/declarative/samegame/SamegameCore/samegame.js | 3 | ||||
-rw-r--r-- | demos/declarative/samegame/samegame.qml | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js index aa1b359..9266767 100755 --- a/demos/declarative/samegame/SamegameCore/samegame.js +++ b/demos/declarative/samegame/SamegameCore/samegame.js @@ -151,7 +151,8 @@ function victoryCheck() gameDuration = new Date() - gameDuration; nameInputDialog.show("You won! Please enter your name: "); nameInputDialog.initialWidth = nameInputDialog.text.width + 20; - nameInputDialog.width = nameInputDialog.initialWidth; + if(nameInputDialog.name == "") + nameInputDialog.width = nameInputDialog.initialWidth; nameInputDialog.text.opacity = 0;//Just a spacer } } diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 9504fb6..3e9c505 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -82,6 +82,7 @@ Rectangle { id: nameInputDialog property int initialWidth: 0 + property alias name: nameInputText.text anchors.centerIn: parent z: 22; |