diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2020-10-08 10:44:46 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2020-10-28 14:59:56 +0200 |
commit | eb08da3249fcbffe845e209ea48ba38484783d29 (patch) | |
tree | d086b3fa5d7f6997214f7ebb1e9eb05ace5b0ff1 | |
parent | 9af6b0edffd3c052532e7f2ce1299b3c49024e4c (diff) |
QQuickTextEdit: ensure we update after changing padding
As it stood we would never updated the paint node upon
changes to padding. The result was that if you changed
padding after start-up, you would not see any visual changes.
This patch will ensure that we update the paint node
when we change padding.
Pick-to: 5.15
Change-Id: I2e9ed4406e8f01c26d1fa2ef09fe35a50f28411c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r-- | src/quick/items/qquicktextedit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 566c9c3f6f..b1be2ebcb7 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -821,6 +821,7 @@ void QQuickTextEditPrivate::setTopPadding(qreal value, bool reset) } if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) { q->updateSize(); + q->updateWholeDocument(); emit q->topPaddingChanged(); } } @@ -835,6 +836,7 @@ void QQuickTextEditPrivate::setLeftPadding(qreal value, bool reset) } if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) { q->updateSize(); + q->updateWholeDocument(); emit q->leftPaddingChanged(); } } @@ -849,6 +851,7 @@ void QQuickTextEditPrivate::setRightPadding(qreal value, bool reset) } if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) { q->updateSize(); + q->updateWholeDocument(); emit q->rightPaddingChanged(); } } @@ -863,6 +866,7 @@ void QQuickTextEditPrivate::setBottomPadding(qreal value, bool reset) } if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) { q->updateSize(); + q->updateWholeDocument(); emit q->bottomPaddingChanged(); } } |