Use block char format to render list item bullets and numbers
It needs to be rendered with the format of the block not the format of the first letter of the block; otherwise if the first letter is black or italics or something, but the rest of the block isn't, the list item text looks out of place. Task-number: QTBUG-3583 Fixes: QTBUG-99148 Change-Id: I63d8d6d6b7cee6bd9938fe1cf42a5f90da1bc0d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 7e7f5f97832e8bf0b260f21aa912812eefaa5997) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6ee424bb4e
commit
bc62e7865d
@ -2128,7 +2128,7 @@ void QTextDocumentLayoutPrivate::drawListItem(const QPointF &offset, QPainter *p
|
||||
{
|
||||
Q_Q(const QTextDocumentLayout);
|
||||
const QTextBlockFormat blockFormat = bl.blockFormat();
|
||||
const QTextCharFormat charFormat = QTextCursor(bl).charFormat();
|
||||
const QTextCharFormat charFormat = bl.charFormat();
|
||||
QFont font(charFormat.font());
|
||||
if (q->paintDevice())
|
||||
font = QFont(font, q->paintDevice());
|
||||
|
Loading…
x
Reference in New Issue
Block a user