aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/imagine
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/imagine')
-rw-r--r--examples/quickcontrols2/imagine/automotive/CMakeLists.txt3
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml57
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/LargeLabel.qml (renamed from examples/quickcontrols2/imagine/automotive/qml/GlowingLabel.qml)6
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/automotive.qml30
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/qml.qrc3
5 files changed, 13 insertions, 86 deletions
diff --git a/examples/quickcontrols2/imagine/automotive/CMakeLists.txt b/examples/quickcontrols2/imagine/automotive/CMakeLists.txt
index 690edaba..ad417e51 100644
--- a/examples/quickcontrols2/imagine/automotive/CMakeLists.txt
+++ b/examples/quickcontrols2/imagine/automotive/CMakeLists.txt
@@ -160,9 +160,8 @@ qt6_add_resources(automotive "imagine-assets"
${imagine-assets_resource_files}
)
set(qml_resource_files
- "CustomGlow.qml"
"FeatureButton.qml"
- "GlowingLabel.qml"
+ "LargeLabel.qml"
"automotive.qml"
)
diff --git a/examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml b/examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml
deleted file mode 100644
index e8481930..00000000
--- a/examples/quickcontrols2/imagine/automotive/qml/CustomGlow.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtGraphicalEffects
-
-Glow {
- color: glowColor
- samples: 20
- spread: 0.3
-}
diff --git a/examples/quickcontrols2/imagine/automotive/qml/GlowingLabel.qml b/examples/quickcontrols2/imagine/automotive/qml/LargeLabel.qml
index 39c5d6fe..186e2826 100644
--- a/examples/quickcontrols2/imagine/automotive/qml/GlowingLabel.qml
+++ b/examples/quickcontrols2/imagine/automotive/qml/LargeLabel.qml
@@ -64,7 +64,6 @@ Item {
property alias horizontalAlignment: label.horizontalAlignment
property alias verticalAlignment: label.verticalAlignment
property bool glowEnabled: true
- property color glowColor: colorGlow
property color color: colorBright
Label {
@@ -72,11 +71,6 @@ Item {
anchors.baseline: root.baseline
color: root.color
- layer.enabled: root.glowEnabled
- layer.effect: CustomGlow {
- color: glowColor
- }
-
TextMetrics {
id: labelTextMetrics
text: label.text
diff --git a/examples/quickcontrols2/imagine/automotive/qml/automotive.qml b/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
index ebf1a445..47341758 100644
--- a/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
+++ b/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
@@ -189,7 +189,7 @@ ApplicationWindow {
}
}
- GlowingLabel {
+ LargeLabel {
text: qsTr("VOLUME")
color: "white"
font.pixelSize: fontSizeMedium
@@ -226,7 +226,7 @@ ApplicationWindow {
RowLayout {
Layout.topMargin: 16
- GlowingLabel {
+ LargeLabel {
id: radioOption
text: qsTr("RADIO")
color: "white"
@@ -235,7 +235,7 @@ ApplicationWindow {
Layout.fillWidth: true
}
- GlowingLabel {
+ LargeLabel {
text: qsTr("AUX")
color: colorLightGrey
font.pixelSize: fontSizeMedium * 0.8
@@ -245,7 +245,7 @@ ApplicationWindow {
Layout.alignment: Qt.AlignBottom
Layout.fillWidth: true
}
- GlowingLabel {
+ LargeLabel {
text: qsTr("MP3")
color: colorDarkGrey
font.pixelSize: fontSizeMedium * 0.6
@@ -366,14 +366,14 @@ ApplicationWindow {
Layout.fillWidth: true
Layout.fillHeight: true
- GlowingLabel {
+ LargeLabel {
id: timeLabel
text: qsTr("11:02")
font.pixelSize: fontSizeExtraLarge
Layout.alignment: Qt.AlignHCenter
- GlowingLabel {
+ LargeLabel {
text: qsTr("AM")
font.pixelSize: fontSizeLarge
anchors.left: parent.right
@@ -405,19 +405,11 @@ ApplicationWindow {
Image {
source: "qrc:/icons/warning.png"
anchors.horizontalCenter: parent.horizontalCenter
-
- layer.enabled: true
- layer.effect: CustomGlow {
- spread: 0.2
- samples: 40
- color: colorWarning
- }
}
- GlowingLabel {
+ LargeLabel {
text: qsTr("Door open")
color: colorWarning
- glowColor: Qt.rgba(colorWarning.r, colorWarning.g, colorWarning.b, 0.4)
}
}
}
@@ -443,13 +435,13 @@ ApplicationWindow {
Row {
anchors.horizontalCenter: parent.horizontalCenter
- GlowingLabel {
+ LargeLabel {
id: outsideTempValueLabel
text: qsTr("31")
font.pixelSize: fontSizeExtraLarge
}
- GlowingLabel {
+ LargeLabel {
text: qsTr("°C")
font.pixelSize: Qt.application.font.pixelSize * 2.5
anchors.baseline: outsideTempValueLabel.baseline
@@ -498,7 +490,7 @@ ApplicationWindow {
anchors.left: parent.left
}
- GlowingLabel {
+ LargeLabel {
id: temperatureValueLabel
text: qsTr("24°C")
font.pixelSize: fontSizeLarge
@@ -523,7 +515,7 @@ ApplicationWindow {
anchors.left: parent.left
}
- GlowingLabel {
+ LargeLabel {
id: powerValueLabel
text: qsTr("10%")
font.pixelSize: fontSizeLarge
diff --git a/examples/quickcontrols2/imagine/automotive/qml/qml.qrc b/examples/quickcontrols2/imagine/automotive/qml/qml.qrc
index d193fd32..b0e4e558 100644
--- a/examples/quickcontrols2/imagine/automotive/qml/qml.qrc
+++ b/examples/quickcontrols2/imagine/automotive/qml/qml.qrc
@@ -1,8 +1,7 @@
<RCC>
<qresource prefix="/qml">
<file>FeatureButton.qml</file>
- <file>GlowingLabel.qml</file>
- <file>CustomGlow.qml</file>
<file>automotive.qml</file>
+ <file>LargeLabel.qml</file>
</qresource>
</RCC>