diff options
Diffstat (limited to 'examples/controls/gallery/pages/TextFieldPage.qml')
-rw-r--r-- | examples/controls/gallery/pages/TextFieldPage.qml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/controls/gallery/pages/TextFieldPage.qml b/examples/controls/gallery/pages/TextFieldPage.qml index ed4799bb..761d2fa6 100644 --- a/examples/controls/gallery/pages/TextFieldPage.qml +++ b/examples/controls/gallery/pages/TextFieldPage.qml @@ -44,8 +44,6 @@ import Qt.labs.controls 1.0 Pane { id: pane - readonly property int itemWidth: Math.max(field.implicitWidth, pane.availableWidth / 3) - Column { spacing: 40 anchors.fill: parent @@ -53,13 +51,14 @@ Pane { Label { width: parent.width wrapMode: Label.Wrap + horizontalAlignment: Qt.AlignHCenter text: "TextField is a single-line text editor." } TextField { id: field placeholderText: "TextField" - width: itemWidth + width: Math.max(implicitWidth, Math.min(implicitWidth * 2, pane.availableWidth / 3)) anchors.horizontalCenter: parent.horizontalCenter } } |