aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2021-09-01 14:53:47 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-07 20:04:06 +0000
commit0d0aff9ad88bbc2a9f78c1256d1869bb9b7c5f88 (patch)
treefd2e29e6cc1952c94d647dffa138835428d14115
parent7468b13ab442131d07b57eb96fad7ec116f33d45 (diff)
Fix implicit size of TextArea
An empty TextArea had a too large size because its placeholder item was too big. This follows a similar pattern as the former fix for TextField (5d8e74ab89b5ae465aefab924f4f14db59328a50) TextArea::test_ImplicitSize demonstrated this bug Task-number: QTBUG-95679 Change-Id: I2b71208a02e47a0a072326a6d600cbac90862ea7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit abf96ed452578d619a89982fc5fe233239768a71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quicknativestyle/controls/DefaultTextArea.qml9
-rw-r--r--tests/auto/quickcontrols2/controls/windows/BLACKLIST2
2 files changed, 4 insertions, 7 deletions
diff --git a/src/quicknativestyle/controls/DefaultTextArea.qml b/src/quicknativestyle/controls/DefaultTextArea.qml
index c634da7e36..c598baf1c5 100644
--- a/src/quicknativestyle/controls/DefaultTextArea.qml
+++ b/src/quicknativestyle/controls/DefaultTextArea.qml
@@ -63,11 +63,10 @@ T.TextArea {
PlaceholderText {
id: placeholder
- height: control.height
- topPadding: control.topPadding
- bottomPadding: control.bottomPadding
- leftPadding: control.leftPadding
- rightPadding: control.rightPadding
+ x: control.leftPadding
+ y: control.topPadding
+ width: control.availableWidth
+ height: control.availableHeight
text: control.placeholderText
font: control.font
color: control.placeholderTextColor
diff --git a/tests/auto/quickcontrols2/controls/windows/BLACKLIST b/tests/auto/quickcontrols2/controls/windows/BLACKLIST
index b69aa99619..c308bccf3b 100644
--- a/tests/auto/quickcontrols2/controls/windows/BLACKLIST
+++ b/tests/auto/quickcontrols2/controls/windows/BLACKLIST
@@ -79,5 +79,3 @@
*
[Slider::test_snapMode_touch:SnapOnRelease (1..-1)]
*
-[TextArea::test_implicitSize]
-*