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 Pick-to: 6.3 6.2 5.15 Change-Id: I63d8d6d6b7cee6bd9938fe1cf42a5f90da1bc0d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
a06ea83eab
commit
7e7f5f9783
@ -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…
Reference in New Issue
Block a user