aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/nativestyle/controls/DefaultTextField.qml5
-rw-r--r--tests/auto/qquickpopup/tst_qquickpopup.cpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/imports/nativestyle/controls/DefaultTextField.qml b/src/imports/nativestyle/controls/DefaultTextField.qml
index c2081d61..63489627 100644
--- a/src/imports/nativestyle/controls/DefaultTextField.qml
+++ b/src/imports/nativestyle/controls/DefaultTextField.qml
@@ -45,8 +45,9 @@ T.TextField {
readonly property bool nativeBackground: background instanceof NativeStyle.StyleItem
- implicitWidth: implicitBackgroundWidth + leftInset + rightInset
- || Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding
+ implicitWidth: Math.max(Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding,
+ implicitBackgroundWidth + leftInset + rightInset,
+ 90 /* minimum */ )
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
contentHeight + topPadding + bottomPadding,
placeholder.implicitHeight + topPadding + bottomPadding)
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index fb91915c..ff04c99d 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -983,6 +983,7 @@ void tst_QQuickPopup::cursorShape()
// Move the mouse over the text field.
const QPoint textFieldPos(popup->x() - 10, textField->height() / 2);
+ QVERIFY(textField->contains(textField->mapFromScene(textFieldPos)));
QTest::mouseMove(window, textFieldPos);
QCOMPARE(window->cursor().shape(), textField->cursor().shape());