From 7111cadd9a2b211edccf33e38efdd12a37e758cf Mon Sep 17 00:00:00 2001 From: Jenny Lofthus Date: Tue, 26 Jul 2022 14:25:47 +0200 Subject: Controls: add todolist example for showcasing the iOS Style Task-number: QTBUG-80261 Change-Id: Ie6d86b0a49bd0684373816d709c7e010aff7e7a5 Reviewed-by: Volker Hilsheimer (cherry picked from commit 6b5cf5969889a88d5f506692c859d1bd4f59d5dd) Reviewed-by: Qt Cherry-pick Bot --- .../quickcontrols2/ios/todolist/FontSizePage.qml | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 examples/quickcontrols2/ios/todolist/FontSizePage.qml (limited to 'examples/quickcontrols2/ios/todolist/FontSizePage.qml') 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 + } + } + } +} -- cgit v1.2.3