QTextLayout/text cursor: use the same height as the selection
The height of the selection was adjusted for high-dpi screens by a fix for QTBUG-98372. But the height of the cursor was forgotten. This is only visible with a very high device pixel ratio. Pick-to: 6.5 Change-Id: I3ae9a2df0a160b50593931828cdd69c0a8d4b5c4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>bb10
parent
d795dfaee7
commit
834617e1d0
|
|
@ -1364,7 +1364,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
|
|||
pen.setCosmetic(true);
|
||||
const qreal center = x + qreal(width) / 2;
|
||||
p->setPen(pen);
|
||||
p->drawLine(QPointF(center, y), QPointF(center, y + (base + descent).toReal()));
|
||||
p->drawLine(QPointF(center, y), QPointF(center, qCeil(y + (base + descent).toReal())));
|
||||
p->setPen(origPen);
|
||||
}
|
||||
p->setCompositionMode(origCompositionMode);
|
||||
|
|
|
|||
Loading…
Reference in New Issue