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>
This commit is contained in:
parent
9b597a09f1
commit
ae55e75b1b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user