diff options
author | Rainer Keller <rainer.keller@digia.com> | 2014-06-11 11:25:47 +0200 |
---|---|---|
committer | Rainer Keller <rainer.keller@digia.com> | 2014-06-11 14:11:53 +0300 |
commit | 0d56278af6eace6747bd7c91215f6e5daef8b84e (patch) | |
tree | d6447a31e8e7ff9bbe7294adfed1f52064cffce0 /basicsuite/sensors/main.qml | |
parent | 1ce9c5aa3d911963b05daf1194f2ad7daab8e491 (diff) |
Show sensors example in landscape view
Show sensors example in landscape view to match the way all
the other examples are presented in the qtlauncher.
Also the calculation is more pysically correct.
Task-number: QTEE-569
Change-Id: I12e1b27e62dfa082d9d768598891a5ce91109436
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Diffstat (limited to 'basicsuite/sensors/main.qml')
-rw-r--r-- | basicsuite/sensors/main.qml | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/basicsuite/sensors/main.qml b/basicsuite/sensors/main.qml index b5a1207..d6e0e9d 100644 --- a/basicsuite/sensors/main.qml +++ b/basicsuite/sensors/main.qml @@ -42,30 +42,30 @@ import QtQuick 2.0 import QtSensors 5.0 import QtSensors 5.0 as Sensors -Item { +Rectangle { id: root - width: 800 - height: 1280 + anchors.fill: parent Component { id: sensorExample Rectangle { id: main - width: root.height - height: root.width - rotation: 90 + width: root.width + height: root.height + anchors.centerIn: parent + color: "blue" border.width: 1 + Accelbubble { + id: bubble + width: parent.width / 2 + height: parent.height + } Light { - id: lys - width: main.width - height: main.height / 2 + anchors.left: bubble.right + width: parent.width / 2 + height: parent.height } - Accelbubble { - width: main.width - height: main.height / 2 - anchors.top: lys.bottom - } } } @@ -74,10 +74,14 @@ Item { Rectangle { width: root.width height: root.height + color: "black" Text { - font.pixelSize: 22 + font.pixelSize: 80 + width: parent.width * 0.8 anchors.centerIn: parent + color: "white" text: "It appears that this device doesn't provide the required sensors!" + wrapMode: Text.WordWrap } } } |