diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2012-10-23 13:14:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-25 14:10:04 +0200 |
commit | de58eb64bc564fcb8af61a45576783e432d2380c (patch) | |
tree | 7521ec6ff5690f7b938fc558ae83a5d30ebf262a /src/gui/opengl | |
parent | 704a4e4747b2c42e262d9b4bd440ff365ab92a35 (diff) |
Revert hacks in text rendering code path
There are a lot of hacks here and there in Qt trying to align the
text in a correct way which caused regressions to appear once
the default coordinate system changed. We need to remove these
hacks to get a more consistent and maintainable base. This also
fixes the regression introduced by changing the aliased coordinate
system.
Task-number: QTBUG-27667
Change-Id: I620db2ca23b7ff6c912f3a51e86e7e36bbef81f0
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r-- | src/gui/opengl/qopenglpaintengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index 8e967207d4..624eeaffd9 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -1638,7 +1638,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type continue; int x = qFloor(staticTextItem->glyphPositions[i].x) + c.baseLineX - margin; - int y = qFloor(staticTextItem->glyphPositions[i].y) - c.baseLineY - margin; + int y = qRound(staticTextItem->glyphPositions[i].y) - c.baseLineY - margin; vertexCoordinates->addQuad(QRectF(x, y, c.w, c.h)); textureCoordinates->addQuad(QRectF(c.x*dx, c.y*dy, c.w * dx, c.h * dy)); |