From cd55d5da5a5a1f676b85f4976b1b5e99e8a5f9c7 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 28 Oct 2010 17:24:07 +1000 Subject: Missing part of 64a05cfa97b1192ac247558c0601ba0e4ec464c9 Task-number: QT-4200 --- demos/declarative/snake/snake.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demos/declarative') diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml index 6eaa976c75..af86aac1ce 100644 --- a/demos/declarative/snake/snake.qml +++ b/demos/declarative/snake/snake.qml @@ -105,7 +105,7 @@ Rectangle { source: "content/pics/pause.png" anchors.centerIn: parent; //opacity is deliberately not animated - opacity: gameActive && !runtime.isActiveWindow + opacity: activeGame && !runtime.isActiveWindow } Image { -- cgit v1.2.1 From eea4ef7bcbababd1af07c75e6711f34aaa4b69e5 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 28 Oct 2010 22:10:13 +0200 Subject: Making the buttons less finger unfriendly I did not dare to apply the same fix to the samegame tutorials, since those are completely diverged from the demo. --- demos/declarative/samegame/SamegameCore/Button.qml | 4 ++-- demos/declarative/samegame/samegame.qml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'demos/declarative') diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml index 7fb7b654bd..140b1968c0 100644 --- a/demos/declarative/samegame/SamegameCore/Button.qml +++ b/demos/declarative/samegame/SamegameCore/Button.qml @@ -48,7 +48,7 @@ Rectangle { signal clicked - width: buttonLabel.width + 20; height: buttonLabel.height + 6 + width: buttonLabel.width + 20; height: buttonLabel.height + 20 smooth: true border { width: 1; color: Qt.darker(activePalette.button) } radius: 8 @@ -70,6 +70,6 @@ Rectangle { MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } Text { - id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText + id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText; font.pixelSize: 24 } } diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index f66c40ec16..b66c5a646e 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -133,7 +133,7 @@ Rectangle { Rectangle { id: toolBar - width: parent.width; height: 32 + width: parent.width; height: 58 color: activePalette.window anchors.bottom: screen.bottom @@ -156,6 +156,7 @@ Rectangle { anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter } text: "Score: " + gameCanvas.score font.bold: true + font.pixelSize: 24 color: activePalette.windowText } } -- cgit v1.2.1 From f49aa13a1bb59eaebdb958305f479dc6e7c8e857 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 5 Nov 2010 11:19:05 +1000 Subject: Fix samegame text input focus The real problem is QTBUG-15047, but by implementing SameGame in a different way it gets worked around very nicely. Task-number: QTBUG-14716 --- demos/declarative/samegame/samegame.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'demos/declarative') diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index b66c5a646e..ab49c04f22 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -92,9 +92,7 @@ Rectangle { enabled: nameInputDialog.initialWidth != 0 } - onOpened: nameInputText.focus = true; onClosed: { - nameInputText.focus = false; if (nameInputText.text != "") Logic.saveHighScore(nameInputText.text); } @@ -116,7 +114,7 @@ Rectangle { TextInput { id: nameInputText anchors { verticalCenter: parent.verticalCenter; left: dialogText.right } - focus: false + focus: visible autoScroll: false maximumLength: 24 onTextChanged: { -- cgit v1.2.1 From 3e30165c350b877bda74955446b0790d516c0490 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 5 Nov 2010 13:34:34 +1000 Subject: Don't allow flagging of flipped tiles in Minehunt Task-number: QTBUG-4249 --- demos/declarative/minehunt/minehunt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demos/declarative') diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp index 709d9450a7..aaaaaac175 100644 --- a/demos/declarative/minehunt/minehunt.cpp +++ b/demos/declarative/minehunt/minehunt.cpp @@ -211,7 +211,7 @@ bool MinehuntGame::flip(int row, int col) bool MinehuntGame::flag(int row, int col) { TileData *t = tile(row, col); - if(!t || !playing) + if(!t || !playing || t->flipped()) return false; t->setHasFlag(!t->hasFlag()); -- cgit v1.2.1 From b74024c0d80b7bb3adf0ceca4b307695bc6db6a1 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 5 Nov 2010 13:47:01 +1000 Subject: Fix minehunt.pro (minehunt is no longer a plugin) Task-number: QTBUG-15011 Reviewed-by: Martin Jones --- demos/declarative/minehunt/minehunt.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'demos/declarative') diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 753ca4eb68..8a7fdc52a9 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -1,7 +1,6 @@ TEMPLATE = app TARGET = minehunt QT += declarative -CONFIG += qt plugin # Input HEADERS += minehunt.h @@ -21,4 +20,4 @@ symbian:{ qmlminehuntfiles.sources = MinehuntCore minehunt.qml DEPLOYMENT = qmlminehuntfiles } - \ No newline at end of file + -- cgit v1.2.1