diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-07-05 13:08:21 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-07-19 10:58:48 +0200 |
commit | 35acf29a38d4b631dd27ce767466533223e8b2c4 (patch) | |
tree | 3f649560250f5b8c4201e987a6b0717a97edf9fb /src/quick/scenegraph/qsgdefaultglyphnode.cpp | |
parent | 1bfa31849d3a23bfdc3b60aec7f645de2e1f81d5 (diff) |
Support text color for color fonts
In order to support pen color for color fonts, we have to bake
the color into the cache (since the cache contains actual
color data and not alpha values).
This is equivalent of 78caba7ae637bf4b33631c3425eb92ec3946c99e in
Qt Base.
[ChangeLog][Text] Added support for text color when using color fonts.
Task-number: QTBUG-74761
Change-Id: I5910636c240bd4c0ec3f0b13db4e2f78d4b062ff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultglyphnode.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode.cpp b/src/quick/scenegraph/qsgdefaultglyphnode.cpp index 0d42102f36..cae0eda3f4 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode.cpp @@ -75,7 +75,7 @@ void QSGDefaultGlyphNode::update() QMargins margins(0, 0, 0, 0); if (m_style == QQuickText::Normal) { - m_material = new QSGTextMaskMaterial(font); + m_material = new QSGTextMaskMaterial(QVector4D(m_color.redF(), m_color.greenF(), m_color.blueF(), m_color.alphaF()), font); } else if (m_style == QQuickText::Outline) { QSGOutlinedTextMaterial *material = new QSGOutlinedTextMaterial(font); material->setStyleColor(m_styleColor); |