summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-09-13 11:53:32 -0700
committerJake Petroules <jake.petroules@qt.io>2016-09-14 15:39:57 +0000
commita3da23d5a92ab0f9b8280b9ed591986f8ac6a2d6 (patch)
tree9a6f22f9cff8b930b2f23a34ffc26b2d084f5781 /src
parent2a658344397729450f869138bf77e063a0a6166b (diff)
Fix smooth scaling for Qt Quick Text items
Task-number: QTBUG-54723 Change-Id: Id94f32791f1d80f0466d9f828de55b413ed1baf4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquicktextnode.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp
index 7ee01b5398..b0bb60f566 100644
--- a/src/quick/items/qquicktextnode.cpp
+++ b/src/quick/items/qquicktextnode.cpp
@@ -160,10 +160,18 @@ void QQuickTextNode::addImage(const QRectF &rect, const QImage &image)
QSGRenderContext *sg = QQuickItemPrivate::get(m_ownerElement)->sceneGraphRenderContext();
QSGImageNode *node = sg->sceneGraphContext()->createImageNode();
QSGTexture *texture = sg->createTexture(image);
+ if (m_ownerElement->smooth()) {
+ texture->setFiltering(QSGTexture::Linear);
+ texture->setMipmapFiltering(QSGTexture::Linear);
+ }
m_textures.append(texture);
node->setTargetRect(rect);
node->setInnerTargetRect(rect);
node->setTexture(texture);
+ if (m_ownerElement->smooth()) {
+ node->setFiltering(QSGTexture::Linear);
+ node->setMipmapFiltering(QSGTexture::Linear);
+ }
appendChildNode(node);
node->update();
}