aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-08 10:44:46 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2021-02-09 15:40:05 +0200
commit1f5616fb2bb8b199c5c238e1e1030a9ec9f875c8 (patch)
tree77cc12c06529172cd7ad9f1326a608d667ab7786 /src/quick/items
parent1cbaf1b043fd650ed6aa96e441554c6644e9039e (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. Change-Id: I2e9ed4406e8f01c26d1fa2ef09fe35a50f28411c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit eb08da3249fcbffe845e209ea48ba38484783d29) Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquicktextedit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 4fd67a9abc..2db2989e36 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -822,6 +822,7 @@ void QQuickTextEditPrivate::setTopPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
q->updateSize();
+ q->updateWholeDocument();
emit q->topPaddingChanged();
}
}
@@ -836,6 +837,7 @@ void QQuickTextEditPrivate::setLeftPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
q->updateSize();
+ q->updateWholeDocument();
emit q->leftPaddingChanged();
}
}
@@ -850,6 +852,7 @@ void QQuickTextEditPrivate::setRightPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
q->updateSize();
+ q->updateWholeDocument();
emit q->rightPaddingChanged();
}
}
@@ -864,6 +867,7 @@ void QQuickTextEditPrivate::setBottomPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
q->updateSize();
+ q->updateWholeDocument();
emit q->bottomPaddingChanged();
}
}