aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/ios/todolist/FontSizePage.qml
diff options
context:
space:
mode:
authorJenny Lofthus <jenny.lofthus@qt.io>2022-07-26 14:25:47 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-08 10:46:31 +0000
commit7111cadd9a2b211edccf33e38efdd12a37e758cf (patch)
tree8c680269ddec6e24f0a4d99d5a242ff193ac5981 /examples/quickcontrols2/ios/todolist/FontSizePage.qml
parent967915aa14c7cdb7bb6ea0af98524648af0ffe75 (diff)
Controls: add todolist example for showcasing the iOS Style
Task-number: QTBUG-80261 Change-Id: Ie6d86b0a49bd0684373816d709c7e010aff7e7a5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 6b5cf5969889a88d5f506692c859d1bd4f59d5dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quickcontrols2/ios/todolist/FontSizePage.qml')
-rw-r--r--examples/quickcontrols2/ios/todolist/FontSizePage.qml44
1 files changed, 44 insertions, 0 deletions
diff --git a/examples/quickcontrols2/ios/todolist/FontSizePage.qml b/examples/quickcontrols2/ios/todolist/FontSizePage.qml
new file mode 100644
index 0000000000..2b0e5b16db
--- /dev/null
+++ b/examples/quickcontrols2/ios/todolist/FontSizePage.qml
@@ -0,0 +1,44 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Page {
+ Frame {
+ width: parent.width - 60
+ anchors.centerIn: parent
+ topPadding: 12
+ bottomPadding: 12
+
+ RowLayout {
+ anchors.fill: parent
+ spacing: 12
+
+ Label {
+ text: qsTr("A")
+ font.pointSize: 15
+ font.weight: 400
+ }
+
+ Slider {
+ snapMode: Slider.SnapAlways
+ stepSize: 1
+ from: 15
+ value: AppSettings.fontSize
+ to: 21
+
+ Layout.fillWidth: true
+
+ onMoved: AppSettings.fontSize = value
+ }
+
+ Label {
+ text: qsTr("A")
+ font.pointSize: 21
+ font.weight: 400
+ }
+ }
+ }
+}