diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-06-04 11:53:38 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-06-04 13:09:09 +0300 |
commit | 5aa53579156a5234a660999c876f17339542113a (patch) | |
tree | 8228a4b742da524ee33ba37ddea116181a87c64f /basicsuite/Controls Touch | |
parent | 1fd1f0d7c0906be8960ce6a7b9246d9e594af806 (diff) |
Update controls to work with latest API
Change-Id: Ib2d71f1b81aa5d4befbf8f61dbfbb0f92ddc00fa
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'basicsuite/Controls Touch')
-rw-r--r-- | basicsuite/Controls Touch/content/ButtonPage.qml | 13 | ||||
-rw-r--r-- | basicsuite/Controls Touch/content/ProgressBarPage.qml | 2 | ||||
-rw-r--r-- | basicsuite/Controls Touch/content/SliderPage.qml | 2 | ||||
-rw-r--r-- | basicsuite/Controls Touch/content/TabBarPage.qml | 7 | ||||
-rw-r--r-- | basicsuite/Controls Touch/content/TextInputPage.qml | 2 | ||||
-rw-r--r-- | basicsuite/Controls Touch/main.qml | 22 |
6 files changed, 24 insertions, 24 deletions
diff --git a/basicsuite/Controls Touch/content/ButtonPage.qml b/basicsuite/Controls Touch/content/ButtonPage.qml index cc5925c..f431a52 100644 --- a/basicsuite/Controls Touch/content/ButtonPage.qml +++ b/basicsuite/Controls Touch/content/ButtonPage.qml @@ -86,7 +86,7 @@ Item { anchors.margins: 20 style: touchStyle text: "Dont press me" - onClicked: if (pageStack) pageStack.pop() + onClicked: if (stackView) stackView.pop() } } @@ -94,7 +94,7 @@ Item { Component { id: touchStyle ButtonStyle { - background: Item { + panel: Item { implicitHeight: 50 implicitWidth: 320 BorderImage { @@ -106,10 +106,15 @@ Item { border.right: 8 anchors.margins: control.pressed ? -4 : 0 source: control.pressed ? "../images/button_pressed.png" : "../images/button_default.png" + Text { + text: control.text + anchors.centerIn: parent + color: "white" + font.pixelSize: 23 + renderType: Text.NativeRendering + } } } - foregroundColor: "white" - font.pixelSize: 23 } } } diff --git a/basicsuite/Controls Touch/content/ProgressBarPage.qml b/basicsuite/Controls Touch/content/ProgressBarPage.qml index 86a46b6..dc0f552 100644 --- a/basicsuite/Controls Touch/content/ProgressBarPage.qml +++ b/basicsuite/Controls Touch/content/ProgressBarPage.qml @@ -96,7 +96,7 @@ Item { Component { id: touchStyle ProgressBarStyle { - background: Rectangle { + panel: Rectangle { implicitHeight: 15 implicitWidth: 400 color: "#444" diff --git a/basicsuite/Controls Touch/content/SliderPage.qml b/basicsuite/Controls Touch/content/SliderPage.qml index 8d9ff0b..8eb9190 100644 --- a/basicsuite/Controls Touch/content/SliderPage.qml +++ b/basicsuite/Controls Touch/content/SliderPage.qml @@ -83,7 +83,7 @@ Item { color: Qt.lighter("#468bb7", 1.2) } - background: Item { + groove: Item { implicitHeight: 50 implicitWidth: 400 Rectangle { diff --git a/basicsuite/Controls Touch/content/TabBarPage.qml b/basicsuite/Controls Touch/content/TabBarPage.qml index 41de782..7651a3c 100644 --- a/basicsuite/Controls Touch/content/TabBarPage.qml +++ b/basicsuite/Controls Touch/content/TabBarPage.qml @@ -70,7 +70,8 @@ Item { Component { id: touchStyle TabViewStyle { - tabBarAlignment: "center" + tabsAlignment: Qt.AlignVCenter + tabOverlap: 0 frame: Item { } tab: Item { implicitWidth: control.width/control.count @@ -79,11 +80,11 @@ Item { anchors.fill: parent border.bottom: 8 border.top: 8 - source: tab.selected ? "../images/tab_selected.png":"../images/tabs_standard.png" + source: styleData.selected ? "../images/tab_selected.png":"../images/tabs_standard.png" Text { anchors.centerIn: parent color: "white" - text: tab.title.toUpperCase() + text: styleData.title.toUpperCase() font.pixelSize: 16 } Rectangle { diff --git a/basicsuite/Controls Touch/content/TextInputPage.qml b/basicsuite/Controls Touch/content/TextInputPage.qml index 3f408d4..605afef 100644 --- a/basicsuite/Controls Touch/content/TextInputPage.qml +++ b/basicsuite/Controls Touch/content/TextInputPage.qml @@ -87,7 +87,7 @@ Item { id: touchStyle TextFieldStyle { - foregroundColor: "white" + textColor: "white" font.pixelSize: 28 background: Item { implicitHeight: 50 diff --git a/basicsuite/Controls Touch/main.qml b/basicsuite/Controls Touch/main.qml index 18b26e9..e4d2562 100644 --- a/basicsuite/Controls Touch/main.qml +++ b/basicsuite/Controls Touch/main.qml @@ -38,10 +38,6 @@ ** ****************************************************************************/ - - - - import QtQuick 2.1 import QtQuick.Controls 1.0 import "content" @@ -58,8 +54,8 @@ Item { // Implements back key navigation Keys.onReleased: { if (event.key === Qt.Key_Back) { - if (pageStack.depth > 1) { - pageStack.pop(); + if (stackView.depth > 1) { + stackView.pop(); event.accepted = true; } else { Qt.quit(); } } @@ -77,7 +73,7 @@ Item { width: opacity ? 60 : 0 anchors.left: parent.left anchors.leftMargin: 20 - opacity: pageStack.depth > 1 ? 1 : 0 + opacity: stackView.depth > 1 ? 1 : 0 anchors.verticalCenter: parent.verticalCenter antialiasing: true height: 60 @@ -92,7 +88,7 @@ Item { id: backmouse anchors.fill: parent anchors.margins: -10 - onClicked: pageStack.pop() + onClicked: stackView.pop() } } @@ -131,11 +127,9 @@ Item { } StackView { - id: pageStack - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.top: toolbar.bottom + id: stackView + anchors.fill: parent + anchors.topMargin: toolbar.height initialItem: Item { width: parent.width @@ -145,7 +139,7 @@ Item { anchors.fill: parent delegate: AndroidDelegate { text: title - onClicked: pageStack.push(Qt.resolvedUrl(page)) + onClicked: stackView.push(Qt.resolvedUrl(page)) } } } |