summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew O'Doherty <andrew.odoherty@qt.io>2017-12-21 13:47:44 +0100
committerAndrew O'Doherty <andrew.odoherty@qt.io>2018-02-01 11:55:40 +0000
commit0f1e8d9199eff71f84ed5bab10b60d9eaef1bf1b (patch)
treed188f6db4dc441d105d51fd7792bb10438c445e7
parent1187c4cfcb8b02e499802331b8fe31dc2c17f53e (diff)
Revamp Qt NFC examples: corkboard example
Align QtNfc Module examples to QML and c++ coding conventions. This commit is focused on the corkboard example. Task-number: QTBUG-60644 Change-Id: I545cbffb6841b14e344ce1763e2387e2d5daa927 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
-rw-r--r--examples/nfc/corkboard/Mode.qml7
-rw-r--r--examples/nfc/corkboard/corkboards.qml5
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/nfc/corkboard/Mode.qml b/examples/nfc/corkboard/Mode.qml
index b06b22a5..0d427cf5 100644
--- a/examples/nfc/corkboard/Mode.qml
+++ b/examples/nfc/corkboard/Mode.qml
@@ -66,7 +66,8 @@ Item {
Text {
anchors { horizontalCenter: parent.horizontalCenter; top: parent.top; topMargin: 10}
text: name;
- font.pixelSize: 30; font.bold: true; color: "white"
+ font { pixelSize: 30; bold: true }
+ color: "white"
style: Text.Outline; styleColor: "black"
}
@@ -75,8 +76,8 @@ Item {
Item {
id: stickyPage
- x: Math.random() * (listView.width-listView.width*0.30) + listView.width*0.10
- y: Math.random() * (listView.height-listView.height*0.30) + listView.height*0.10
+ x: ListView.width * (0.7 * Math.random() + 0.1)
+ y: ListView.height * (0.7 * Math.random() + 0.1)
rotation: -listView.horizontalVelocity / 200;
Behavior on rotation {
diff --git a/examples/nfc/corkboard/corkboards.qml b/examples/nfc/corkboard/corkboards.qml
index a1d9bee1..92cb6616 100644
--- a/examples/nfc/corkboard/corkboards.qml
+++ b/examples/nfc/corkboard/corkboards.qml
@@ -110,15 +110,14 @@ Rectangle {
ListElement {
name: "Work"
notes: [
- //ListElement { noteText: "To write a tag, click the red flag of a note and then touch a tag" },
- ListElement { noteText: "https://www.qt.io" }
+ ListElement { noteText: "https://www.qt.io" },
+ ListElement { noteText: "To write a tag, click the red flag of a note and then touch a tag" }
]
}
}
ListView {
id: listView
-
anchors.fill: parent
orientation: ListView.Horizontal
snapMode: ListView.SnapOneItem