aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextnode_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-07-04 14:56:38 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-10 14:22:34 +0200
commitb0b4869440fc6e5af42797cbcaa64ec30238be73 (patch)
tree208f5f90c9ee6c3a71cc9e751a9374addede67d0 /src/quick/items/qquicktextnode_p.h
parentc66d00a7f53d6a6a847bc7171529273f4d089923 (diff)
Add option to use native rasterizer for SceneGraph text
For old-style (desktop components) apps using QML 2 on regular density displays, distance field text will look out of place. We introduce an option to use the native rasterizer instead if you would rather have native look and feel than scalable text items. Change-Id: Idb38e3c89f2deab9ae1963357c6c5fb235ddeab8 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextnode_p.h')
-rw-r--r--src/quick/items/qquicktextnode_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextnode_p.h b/src/quick/items/qquicktextnode_p.h
index 9e7573104b..c5b55df729 100644
--- a/src/quick/items/qquicktextnode_p.h
+++ b/src/quick/items/qquicktextnode_p.h
@@ -100,6 +100,9 @@ public:
QSGNode *parentNode = 0);
void addImage(const QRectF &rect, const QImage &image);
+ bool useNativeRenderer() const { return m_useNativeRenderer; }
+ void setUseNativeRenderer(bool on) { m_useNativeRenderer = on; }
+
private:
void mergeFormats(QTextLayout *textLayout, QVarLengthArray<QTextLayout::FormatRange> *mergedFormats);
@@ -107,6 +110,7 @@ private:
QSGSimpleRectNode *m_cursorNode;
QList<QSGTexture *> m_textures;
QQuickItem *m_ownerElement;
+ bool m_useNativeRenderer;
};
QT_END_NAMESPACE