diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-03-19 09:22:20 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-03-19 11:20:05 +0000 |
commit | 28cdc759c4e902b858efdc3f1718318ca4cbf380 (patch) | |
tree | 5c546a335122f535eea4097a789913bc9329d992 | |
parent | 604868348a2fe42d7fcd45c4be40d07822f73d85 (diff) |
Automatically fall back to old text renderer for "clip" word wrap
There is a word wrap setting in text which expect the text renderer to
clip the text to its area. This was missed when implementing the
distance field renderer, and in the interest of time we will just
automatically fall back to the old text renderer for this mode in
2.3 and then implement a fix in 2.4.
Task-number: QT3DS-3138
Change-Id: I027f369e16d9577c6f941a73d7cf398fdb553f64
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/runtime/q3dsscenemanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/q3dsscenemanager.cpp b/src/runtime/q3dsscenemanager.cpp index dffa07e..5dc37a3 100644 --- a/src/runtime/q3dsscenemanager.cpp +++ b/src/runtime/q3dsscenemanager.cpp @@ -4910,7 +4910,8 @@ Qt3DCore::QEntity *Q3DSSceneManager::buildText(Q3DSTextNode *text3DS, Q3DSLayerN data->entity->setObjectName(QObject::tr("top level text %1").arg(QString::fromUtf8(text3DS->id()))); #if QT_VERSION >= QT_VERSION_CHECK(5,12,2) - if (shouldDistanceFieldRender) { + bool useDistanceFields = shouldDistanceFieldRender && text3DS->wordWrap() != Q3DSTextNode::Clip; + if (useDistanceFields) { data->distanceFieldText = true; data->dropShadow = text3DS->shadow(); QVector2D boundingBox = text3DS->boundingBox(); |