aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2019-09-11 20:54:25 +0300
committerKonstantin Ritt <ritt.ks@gmail.com>2019-09-13 17:31:27 +0300
commitd41362ed752031fdd798e4838b3a56fbb2717f3f (patch)
tree04a7da2e814fff87677479fde05570bb60812f72
parent27c18e488cd826365b1def7fb449fbd381c42bac (diff)
TextArea: correctly resize background when there is no flickable
Change-Id: Idaf385d12ca9388c0bb0b3f8a47c8e75c620b7eb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index 95bf5bb1..e24844d8 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -369,6 +369,8 @@ void QQuickTextAreaPrivate::detachFlickable()
QObjectPrivate::disconnect(flickable, &QQuickFlickable::contentHeightChanged, this, &QQuickTextAreaPrivate::resizeFlickableControl);
flickable = nullptr;
+
+ resizeBackground();
}
void QQuickTextAreaPrivate::ensureCursorVisible()
@@ -437,7 +439,10 @@ void QQuickTextAreaPrivate::itemGeometryChanged(QQuickItem *item, QQuickGeometry
Q_UNUSED(change);
Q_UNUSED(diff);
- resizeFlickableControl();
+ if (flickable)
+ resizeFlickableControl();
+ else
+ resizeBackground();
}
qreal QQuickTextAreaPrivate::getImplicitWidth() const