aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-01-27 14:34:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-27 20:00:25 +0100
commitc39e6e89a50b5a3d2618a6c5a20950f19a0f7dfc (patch)
tree26c694ea0991190bc63747eee2168a2e70046210
parent08db29d5b89e05657ac19022f1ff32275201df78 (diff)
Allow renderType: Text.NativeRendering on retina displays/devices
Setting the renderType to Text.NativeRendering might be needed in some cases where distance-field does not produce the expected results, such as for emoji characters or really large fonts. These use cases are valid on retina displays as well, so having the setter second-guess the request from the user to use native rendering is not ideal. Change-Id: I7c6049766e60574487c29de07fbd5c100ec69a2a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
-rw-r--r--src/quick/items/qquicktext.cpp5
-rw-r--r--src/quick/items/qquicktextedit.cpp5
-rw-r--r--src/quick/items/qquicktextinput.cpp5
3 files changed, 3 insertions, 12 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 5b5dd0ef03..03454e2bf9 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2216,7 +2216,7 @@ QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data
else
node = static_cast<QQuickTextNode *>(oldNode);
- node->setUseNativeRenderer(d->renderType == NativeRendering && d->window->devicePixelRatio() <= 1);
+ node->setUseNativeRenderer(d->renderType == NativeRendering);
node->deleteContent();
node->setMatrix(QMatrix4x4());
@@ -2649,9 +2649,6 @@ void QQuickText::hoverLeaveEvent(QHoverEvent *event)
not require advanced features such as transformation of the text. Using such features in
combination with the NativeRendering render type will lend poor and sometimes pixelated
results.
-
- On HighDpi "retina" displays and mobile and embedded platforms, this property is ignored
- and QtRendering is always used.
*/
QQuickText::RenderType QQuickText::renderType() const
{
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index c342c79ce5..38a40a9e81 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -418,9 +418,6 @@ void QQuickTextEdit::setTextFormat(TextFormat format)
not require advanced features such as transformation of the text. Using such features in
combination with the NativeRendering render type will lend poor and sometimes pixelated
results.
-
- On HighDpi "retina" displays and mobile and embedded platforms, this property is ignored
- and QtRendering is always used.
*/
QQuickTextEdit::RenderType QQuickTextEdit::renderType() const
{
@@ -2371,7 +2368,7 @@ QQuickTextNode *QQuickTextEditPrivate::createTextNode()
{
Q_Q(QQuickTextEdit);
QQuickTextNode* node = new QQuickTextNode(q);
- node->setUseNativeRenderer(renderType == QQuickTextEdit::NativeRendering && window->devicePixelRatio() <= 1);
+ node->setUseNativeRenderer(renderType == QQuickTextEdit::NativeRendering);
node->initEngine(color, selectedTextColor, selectionColor);
return node;
}
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 1dd1dfa57e..9f155f9cf7 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -155,9 +155,6 @@ void QQuickTextInput::setText(const QString &s)
not require advanced features such as transformation of the text. Using such features in
combination with the NativeRendering render type will lend poor and sometimes pixelated
results.
-
- On HighDpi "retina" displays and mobile and embedded platforms, this property is ignored
- and QtRendering is always used.
*/
QQuickTextInput::RenderType QQuickTextInput::renderType() const
{
@@ -1862,7 +1859,7 @@ QSGNode *QQuickTextInput::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData
}
}
} else {
- node->setUseNativeRenderer(d->renderType == NativeRendering && d->window->devicePixelRatio() <= 1);
+ node->setUseNativeRenderer(d->renderType == NativeRendering);
node->deleteContent();
node->setMatrix(QMatrix4x4());