forked from qt-creator/qt-creator
Fix minor ifdefed-out block drawing issue
When drawing the background for an ifdefed-out block, expand to the end of the visible viewport, even when scrolled horizontally to the right.
This commit is contained in:
@@ -2569,7 +2569,7 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
|
||||
|
||||
if (TextEditDocumentLayout::ifdefedOut(block)) {
|
||||
QRectF rr = r;
|
||||
rr.setWidth(viewport()->width());
|
||||
rr.setRight(viewportRect.width() - offset.x());
|
||||
if (lineX > 0)
|
||||
rr.setRight(qMin(lineX, rr.right()));
|
||||
painter.fillRect(rr, d->m_ifdefedOutFormat.background());
|
||||
|
||||
Reference in New Issue
Block a user