diff options
Diffstat (limited to 'examples/declarative/demos')
5 files changed, 9 insertions, 9 deletions
diff --git a/examples/declarative/demos/calculator/qml/calculator/calculator.qml b/examples/declarative/demos/calculator/qml/calculator/calculator.qml index d7355082..e51040c3 100644 --- a/examples/declarative/demos/calculator/qml/calculator/calculator.qml +++ b/examples/declarative/demos/calculator/qml/calculator/calculator.qml @@ -63,7 +63,7 @@ Rectangle { id: main state: "orientation " + runtime.orientation - property bool landscapeWindow: window.width > window.height + property bool landscapeWindow: window.width > window.height property real baseWidth: landscapeWindow ? window.height : window.width property real baseHeight: landscapeWindow ? window.width : window.height property real rotationDelta: landscapeWindow ? -90 : 0 diff --git a/examples/declarative/demos/samegame/qml/samegame/SamegameCore/samegame.js b/examples/declarative/demos/samegame/qml/samegame/SamegameCore/samegame.js index d7b827a1..058062d2 100644 --- a/examples/declarative/demos/samegame/qml/samegame/SamegameCore/samegame.js +++ b/examples/declarative/demos/samegame/qml/samegame/SamegameCore/samegame.js @@ -226,7 +226,7 @@ function initHighScoreBar() + maxColumn + "x" + maxRow + '" ORDER BY score desc LIMIT 10'); if(rs.rows.length < 10) highScoreBar = 0; - else + else highScoreBar = rs.rows.item(rs.rows.length - 1).score; } ); diff --git a/examples/declarative/demos/samegame/qml/samegame/highscores/scores.php b/examples/declarative/demos/samegame/qml/samegame/highscores/scores.php index 3cceb2d7..ffb0dd5d 100644 --- a/examples/declarative/demos/samegame/qml/samegame/highscores/scores.php +++ b/examples/declarative/demos/samegame/qml/samegame/highscores/scores.php @@ -11,8 +11,8 @@ //if($grid != "10x10"){ //Need a standard, so as to reject others? //} - $file = fopen("score_data.xml", "a"); #It's XML. Happy? - $ret = fwrite($file, "<record><score>". $score . "</score><name>" + $file = fopen("score_data.xml", "a"); #It's XML. Happy? + $ret = fwrite($file, "<record><score>". $score . "</score><name>" . $name . "</name><gridSize>" . $grid . "</gridSize><seconds>" . $time . "</seconds></record>\n"); echo "Your score has been recorded. Thanks for playing!"; @@ -21,7 +21,7 @@ }else{#Read high score list #Now uses XSLT to display. So just print the file. With XML cruft added. #Note that firefox at least won't apply the XSLT on a php file. So redirecting - $file = fopen("scores.xml", "w"); + $file = fopen("scores.xml", "w"); $ret = fwrite($file, '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n" . '<?xml-stylesheet type="text/xsl" href="score_style.xsl"?>' . "\n" . "<records>\n" . file_get_contents("score_data.xml") . "</records>\n"); diff --git a/examples/declarative/demos/samegame/qml/samegame/samegame.qml b/examples/declarative/demos/samegame/qml/samegame/samegame.qml index db8016fc..2d67bcb2 100644 --- a/examples/declarative/demos/samegame/qml/samegame/samegame.qml +++ b/examples/declarative/demos/samegame/qml/samegame/samegame.qml @@ -88,7 +88,7 @@ Rectangle { z: 22; Behavior on width { - NumberAnimation {} + NumberAnimation {} enabled: nameInputDialog.initialWidth != 0 } @@ -119,7 +119,7 @@ Rectangle { maximumLength: 24 onTextChanged: { var newWidth = nameInputText.width + dialogText.width + 40; - if ( (newWidth > nameInputDialog.width && newWidth < screen.width) + if ( (newWidth > nameInputDialog.width && newWidth < screen.width) || (nameInputDialog.width > nameInputDialog.initialWidth) ) nameInputDialog.width = newWidth; } @@ -138,7 +138,7 @@ Rectangle { Button { id: newGameButton anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter } - text: "New Game" + text: "New Game" onClicked: Logic.startNewGame() } diff --git a/examples/declarative/demos/snake/qml/snake/content/snake.js b/examples/declarative/demos/snake/qml/snake/content/snake.js index 837b82ad..5d4b6098 100644 --- a/examples/declarative/demos/snake/qml/snake/content/snake.js +++ b/examples/declarative/demos/snake/qml/snake/content/snake.js @@ -63,7 +63,7 @@ function startNewGame() link.dying = false; } else { if(linkComponent.status != Component.Ready) { - if(linkComponent.status == Component.Error) + if (linkComponent.status == Component.Error) console.log(linkComponent.errorString()); else console.log("Still loading linkComponent"); |