aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2023-05-02 15:00:42 +0800
committerMitch Curtis <mitch.curtis@qt.io>2023-05-03 08:06:05 +0800
commit4ab11d03ac2aecec3d4d304e566c9bb161e22090 (patch)
tree8a176575493c4421df2c1c11457bc74a926496ea /src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp
parent25b259270d87a684f01e29f1b252385a5f121ac5 (diff)
Material: fix placeholder text alignment
The placeholder text should always be aligned to the left according to my tests on native Android via an emulator. Fixes: QTBUG-113172 Pick-to: 6.5 6.5.1 Change-Id: I75ae31e1e6b9846d90ab5034c43f8684698e0ab7 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp')
-rw-r--r--src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp b/src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp
index 6dfb1b8e2a..7ec3386457 100644
--- a/src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp
+++ b/src/quickcontrols/material/impl/qquickmaterialplaceholdertext.cpp
@@ -260,7 +260,9 @@ void QQuickMaterialPlaceholderText::maybeSetFocusAnimationProgress()
void QQuickMaterialPlaceholderText::componentComplete()
{
- QQuickPlaceholderText::componentComplete();
+ // We deliberately do not call QQuickPlaceholderText's implementation here,
+ // as Material 3 placeholder text should always be left-aligned.
+ QQuickText::componentComplete();
if (!parentItem())
qmlWarning(this) << "Expected parent item by component completion!";