Skip to content

Commit

Permalink
Fix line number area rendering (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Apr 27, 2021
1 parent 3e7a413 commit 6026712
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ui/src/abstractlogview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ void AbstractLogView::wheelEvent( QWheelEvent* wheelEvent )
y_delta = pixel_delta.y();
}

if (y_delta == 0) {
if ( y_delta == 0 ) {
QAbstractScrollArea::wheelEvent( wheelEvent );
return;
}
Expand Down Expand Up @@ -1769,8 +1769,7 @@ void AbstractLogView::drawTextArea( QPaintDevice* paint_device )

painter.setPen( palette.color( QPalette::Text ) );
painter.fillRect( contentStartPosX - SEPARATOR_WIDTH, 0,
lineNumberAreaWidth + SEPARATOR_WIDTH, paintDeviceHeight,
palette.color( QPalette::Disabled, QPalette::Text ) );
lineNumberAreaWidth + SEPARATOR_WIDTH, paintDeviceHeight, Qt::darkGray );

painter.drawLine( contentStartPosX + lineNumberAreaWidth - SEPARATOR_WIDTH, 0,
contentStartPosX + lineNumberAreaWidth - SEPARATOR_WIDTH,
Expand Down Expand Up @@ -1978,7 +1977,7 @@ void AbstractLogView::drawTextArea( QPaintDevice* paint_device )
static const QString lineNumberFormat( "%1" );
const QString& lineNumberStr = lineNumberFormat.arg(
displayLineNumber( lineNumber ).get(), nbDigitsInLineNumber );
painter.setPen( palette.color( QPalette::Text ) );
painter.setPen( Qt::white );
painter.drawText( lineNumberAreaStartX + LINE_NUMBER_PADDING, yPos + fontAscent,
lineNumberStr );
}
Expand Down

0 comments on commit 6026712

Please sign in to comment.