aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/quickcontrols/material/pages/TextFieldPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/quickcontrols/material/pages/TextFieldPage.qml')
-rw-r--r--tests/manual/quickcontrols/material/pages/TextFieldPage.qml118
1 files changed, 118 insertions, 0 deletions
diff --git a/tests/manual/quickcontrols/material/pages/TextFieldPage.qml b/tests/manual/quickcontrols/material/pages/TextFieldPage.qml
new file mode 100644
index 0000000000..9aeef4b5c2
--- /dev/null
+++ b/tests/manual/quickcontrols/material/pages/TextFieldPage.qml
@@ -0,0 +1,118 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+import QtQuick
+import QtQuick.Controls.Material
+import QtQuick.Layouts
+
+import ".."
+
+Page {
+ topPadding: Constants.pageTopPadding
+
+ component TextFieldFlow: Flow {
+ id: layout
+ spacing: 40
+
+ required property int containerStyle
+
+ TextField {
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ placeholderText: "placeholderText"
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "text"
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "text"
+ placeholderText: "placeholderText"
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ placeholderText: "Disabled placeholder"
+ enabled: false
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "Disabled text"
+ enabled: false
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "text"
+ placeholderText: "placeholderText"
+ enabled: false
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "0 leftPadding"
+ placeholderText: "placeholderText"
+ leftPadding: 0
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "0 rightPadding"
+ placeholderText: "placeholderText"
+ rightPadding: 0
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "0 topPadding"
+ placeholderText: "placeholderText"
+ topPadding: 0
+
+ Material.containerStyle: layout.containerStyle
+ }
+
+ TextField {
+ text: "0 bottomPadding"
+ placeholderText: "placeholderText"
+ bottomPadding: 0
+
+ Material.containerStyle: layout.containerStyle
+ }
+ }
+
+ ColumnLayout {
+ width: parent.width
+
+ Label {
+ text: "Filled"
+ }
+ TextFieldFlow {
+ containerStyle: Material.Filled
+
+ Layout.fillWidth: true
+ Layout.bottomMargin: 40
+ }
+
+ Label {
+ text: "Outlined"
+ }
+ TextFieldFlow {
+ containerStyle: Material.Outlined
+
+ Layout.fillWidth: true
+ }
+ }
+}