diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2012-11-08 15:04:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-09 00:16:09 +0100 |
commit | ffab396a1d3a6054fca6c2727cd685ea89dada0e (patch) | |
tree | 8c9777ff3ef91a560a149215a584f43502d05301 | |
parent | eba5128f66718d33d48a98ae385b5c44569bc70e (diff) |
Don't use design metrics with NativeRendering on TextInput
We only set the design metrics property in init(), before the
renderType has been set. Since updateLayout() is called every
time the renderType changes, it should be sufficient to set it
there.
Change-Id: If5b2cb3738e8135195848857a30f4e646bdf1d0b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 22551c9d4c..88e6d750eb 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -2698,6 +2698,9 @@ void QQuickTextInputPrivate::updateLayout() option.setTextDirection(layoutDirection()); option.setWrapMode(QTextOption::WrapMode(wrapMode)); option.setAlignment(Qt::Alignment(q->effectiveHAlign())); + if (!qmlDisableDistanceField()) + option.setUseDesignMetrics(renderType != QQuickTextInput::NativeRendering); + m_textLayout.setTextOption(option); m_textLayout.setFont(font); |