diff options
Diffstat (limited to 'demos/declarative/calculator')
-rw-r--r-- | demos/declarative/calculator/Core/calculator.js | 4 | ||||
-rw-r--r-- | demos/declarative/calculator/calculator.qml | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/demos/declarative/calculator/Core/calculator.js b/demos/declarative/calculator/Core/calculator.js index c80c42f83d..16cc309c13 100644 --- a/demos/declarative/calculator/Core/calculator.js +++ b/demos/declarative/calculator/Core/calculator.js @@ -83,9 +83,9 @@ function doOperation(op) { display.text ="0" } - if (op == rotateLeft) - main.state = "orientation " + Orientation.Landscape if (op == rotateRight) + main.state = "orientation " + Orientation.Landscape + if (op == rotateLeft) main.state = '' } diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml index 63b6c55447..288455b418 100644 --- a/demos/declarative/calculator/calculator.qml +++ b/demos/declarative/calculator/calculator.qml @@ -85,7 +85,7 @@ Rectangle { Button { id: rotateButton - width: column.w; height: column.h; color: 'purple'; operation: rotateLeft + width: column.w; height: column.h; color: 'purple'; operation: rotateRight } Button { width: column.w; height: column.h; color: 'purple'; operation: leftArrow } Button { width: column.w; height: column.h; color: 'purple'; operation: "C" } @@ -134,18 +134,18 @@ Rectangle { states: [ State { name: "orientation " + Orientation.Landscape - PropertyChanges { target: main; rotation: -90; width: window.height; height: window.width } - PropertyChanges { target: rotateButton; operation: rotateRight } + PropertyChanges { target: main; rotation: 90; width: window.height; height: window.width } + PropertyChanges { target: rotateButton; operation: rotateLeft } }, State { name: "orientation " + Orientation.PortraitInverted - PropertyChanges { target: main; rotation: -180; } - PropertyChanges { target: rotateButton; operation: rotateLeft } + PropertyChanges { target: main; rotation: 180; } + PropertyChanges { target: rotateButton; operation: rotateRight } }, State { name: "orientation " + Orientation.LandscapeInverted - PropertyChanges { target: main; rotation: -270; width: window.height; height: window.width } - PropertyChanges { target: rotateButton; operation: rotateRight } + PropertyChanges { target: main; rotation: 270; width: window.height; height: window.width } + PropertyChanges { target: rotateButton; operation: rotateLeft } } ] |