forked from qt-creator/qt-creator
Editor: always paint complete line when painting current line highlight
If the paint event rect does not contain the complete line, request an update with the full line width also for editable editors. This fixes current line highlight issues in the commit reword editor. Change-Id: I6b93230a47bdd61248c1aa9631208606cbbae7c8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4334,7 +4334,7 @@ void TextEditorWidgetPrivate::paintCurrentLineHighlight(const PaintEventData &da
|
|||||||
QColor color = m_document->fontSettings().toTextCharFormat(C_CURRENT_LINE).background().color();
|
QColor color = m_document->fontSettings().toTextCharFormat(C_CURRENT_LINE).background().color();
|
||||||
// set alpha, otherwise we cannot see block highlighting and find scope underneath
|
// set alpha, otherwise we cannot see block highlighting and find scope underneath
|
||||||
color.setAlpha(128);
|
color.setAlpha(128);
|
||||||
if (!data.isEditable && !data.eventRect.contains(lineRect.toRect())) {
|
if (!data.eventRect.contains(lineRect.toRect())) {
|
||||||
QRect updateRect = data.eventRect;
|
QRect updateRect = data.eventRect;
|
||||||
updateRect.setLeft(0);
|
updateRect.setLeft(0);
|
||||||
updateRect.setRight(data.viewportRect.width() - int(data.offset.x()));
|
updateRect.setRight(data.viewportRect.width() - int(data.offset.x()));
|
||||||
|
Reference in New Issue
Block a user