diff options
Diffstat (limited to 'src/imports/nativestyle/controls/DefaultTextField.qml')
-rw-r--r-- | src/imports/nativestyle/controls/DefaultTextField.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/imports/nativestyle/controls/DefaultTextField.qml b/src/imports/nativestyle/controls/DefaultTextField.qml index 847847b5..8df069d8 100644 --- a/src/imports/nativestyle/controls/DefaultTextField.qml +++ b/src/imports/nativestyle/controls/DefaultTextField.qml @@ -45,8 +45,11 @@ T.TextField { readonly property bool nativeBackground: background instanceof NativeStyle.StyleItem - implicitWidth: Math.max(96, background.implicitWidth + leftPadding + rightPadding + leftInset + rightInset) - implicitHeight: background.implicitHeight + topPadding + bottomPadding + topInset + bottomInset + implicitWidth: implicitBackgroundWidth + leftInset + rightInset + || Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding, + placeholder.implicitHeight + topPadding + bottomPadding) font.pixelSize: nativeBackground ? background.styleFont(control).pixelSize : undefined |