Skip to content

Commit b5be8e4

Browse files
committed
draw cursor shorter to avoid remaining dots on screen
1 parent fc919f1 commit b5be8e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/qcodeedit/lib/document/qdocument.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7191,13 +7191,14 @@ void QDocumentPrivate::drawCursors(QPainter *p, const QDocument::PaintContext &c
71917191
p->drawRect(QRectF(pt.x(), pt.y(), width, QDocumentPrivate::m_lineSpacing));
71927192
}else{
71937193
// regular line cursor
7194-
QPointF pt = cur.documentPosition();
7195-
QPointF curHt(0, QDocumentPrivate::m_lineSpacing-1.);
7194+
QPointF pt = cur.documentPosition()+QPointF(0,2.);
7195+
QPointF curHt(0, QDocumentPrivate::m_lineSpacing-4.);
71967196
QPen pen(p->pen());
71977197
if (m_drawCursorBold) {
71987198
pen.setWidthF(2.);
71997199
}
72007200
p->setPen(pen);
7201+
qDebug()<<QDocumentPrivate::m_lineSpacing<<pt<<pt+curHt;
72017202
p->drawLine(pt, pt + curHt);
72027203
/*if (m_drawCursorBold) {
72037204
pt.setX(pt.x() + 1);

0 commit comments

Comments
 (0)