diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-12-11 15:48:41 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-12-13 08:43:39 +0000 |
commit | ae55e75b1b6c2c07f4ef084ee27448fc0262c7c0 (patch) | |
tree | 55f515cda4d9300a75b71261f8b3833cc62c5dd8 | |
parent | 9b597a09f1b96071fb1e2ee72aafc9dfed76ed14 (diff) |
Paint text decoration where the text is
For multi text-item texts we should render the text decoration at the
same position as the text-item part is, and not always from the
beginning of the line.
Task-number: QTBUG-60422
Change-Id: I9aa58fc164122ad1fae9716b8b18bdfbbbd778a9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r-- | src/gui/painting/qpainter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index b95f9b18aa..6e84a3f384 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -6482,7 +6482,7 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText extended->drawTextItem(QPointF(x, y), ti2); else engine->drawTextItem(QPointF(x, y), ti2); - drawTextItemDecoration(q, p, ti2.fontEngine, textEngine, ti2.underlineStyle, + drawTextItemDecoration(q, QPointF(x, y), ti2.fontEngine, textEngine, ti2.underlineStyle, ti2.flags, ti2.width.toReal(), ti2.charFormat); if (!rtl) @@ -6515,7 +6515,7 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText extended->drawTextItem(QPointF(x, y), ti2); else engine->drawTextItem(QPointF(x,y), ti2); - drawTextItemDecoration(q, p, ti2.fontEngine, textEngine, ti2.underlineStyle, + drawTextItemDecoration(q, QPointF(x, y), ti2.fontEngine, textEngine, ti2.underlineStyle, ti2.flags, ti2.width.toReal(), ti2.charFormat); // reset the high byte for all glyphs |