aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgdefaultglyphnode.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-10-03 13:16:10 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-03 16:18:44 +0200
commit661e624121004dd73467300e467aacae6d8d2f66 (patch)
treeec50b080d2ef38295ef7d830c1eb7d3912a3d2c4 /src/quick/scenegraph/qsgdefaultglyphnode.cpp
parentc20ce89e6e92c403e9b50462a0e000056a2eff73 (diff)
Separate and fix 8/24-bit text mask materials.
The logic was a bit cluttered, trying to handle two rather different pieces of logic in one material shader. The 8-bit shader does not try to be fancy in any way, it just takes the alpha * color which gives similar intensities as the distance fields. The logic for 24-bit contains a tiny fix for opacity. The patch also includes a change from QColor -> QVector4D and QPointF -> QVector2D to simplify the conversion needed and be consistent with what kind of types we use. Task-number: QTBUG-33805 Task-number: QTBUG-33633 Task-number: QTCREATORBUG-10176 Change-Id: Ia8c464f98a1fc2c190a1d323fc21466a4d7b0dfd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultglyphnode.cpp')
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode.cpp b/src/quick/scenegraph/qsgdefaultglyphnode.cpp
index 5e11e4cb0e..65a12866d9 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode.cpp
+++ b/src/quick/scenegraph/qsgdefaultglyphnode.cpp
@@ -112,10 +112,10 @@ void QSGDefaultGlyphNode::update()
} else {
QSGStyledTextMaterial *material = new QSGStyledTextMaterial(font);
if (m_style == QQuickText::Sunken) {
- material->setStyleShift(QPointF(0, -1));
+ material->setStyleShift(QVector2D(0, -1));
margins.setTop(1);
} else if (m_style == QQuickText::Raised) {
- material->setStyleShift(QPointF(0, 1));
+ material->setStyleShift(QVector2D(0, 1));
margins.setBottom(1);
}
material->setStyleColor(m_styleColor);