aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/TextField.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/material/TextField.qml')
-rw-r--r--src/imports/controls/material/TextField.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/imports/controls/material/TextField.qml b/src/imports/controls/material/TextField.qml
index a6406afa..25811322 100644
--- a/src/imports/controls/material/TextField.qml
+++ b/src/imports/controls/material/TextField.qml
@@ -42,9 +42,11 @@ T.TextField {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- placeholder.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- placeholder.implicitHeight + 1 + topPadding + bottomPadding)
+ placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0)
+ || contentWidth + leftPadding + rightPadding
+ implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ placeholder.implicitHeight + topPadding + bottomPadding)
topPadding: 8
bottomPadding: 16