aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/window/window.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-10-06 14:34:51 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-10-10 08:05:52 +0000
commitcca4531ecfc77cafd93dfab0548d8c8cb588e6d3 (patch)
tree2768256b883e798a981bb3ff2c2ce207248ee2f1 /examples/quick/window/window.qml
parent72336cd29ecae2555b98465a2b067b16a4a721b2 (diff)
add shared Label for examples, and use in the Window example
It just saves the trouble of setting the Text color to the correct palette text color repeatedly, and avoids having black text on a dark background in case a dark theme is in use. Change-Id: If5c38fabe7f047fa5f6956a9d8b235886ab7ab5c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/quick/window/window.qml')
-rw-r--r--examples/quick/window/window.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/quick/window/window.qml b/examples/quick/window/window.qml
index d50bce61b3..f3052a7d62 100644
--- a/examples/quick/window/window.qml
+++ b/examples/quick/window/window.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -57,7 +57,7 @@ QtObject {
anchors.margins: defaultSpacing
spacing: defaultSpacing
property real cellWidth: col.width / 3 - spacing
- Text { text: "Control the second window:" }
+ Shared.Label { text: "Control the second window:" }
Grid {
id: grid
columns: 3
@@ -121,7 +121,7 @@ QtObject {
}
return "unknown";
}
- Text {
+ Shared.Label {
id: visibilityLabel
text: "second window is " + (testWindow.visible ? "visible" : "invisible") +
" and has visibility " + parent.visibilityToString(testWindow.visibility)
@@ -145,7 +145,7 @@ QtObject {
Rectangle {
anchors.fill: parent
anchors.margins: defaultSpacing
- Text {
+ Shared.Label {
anchors.centerIn: parent
text: "Second Window"
}