Skip to content

Commit 19b437e

Browse files
committed
If no line at difference area, fill the noline with lightgray pattern, not only for the selected range, it's for all
1 parent 931e6ce commit 19b437e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

kdiff3/src-QT4/difftextwindow.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,13 @@ void DiffTextWindowData::writeLine(
10661066
p.fillRect( xLeft, yOffset, fontWidth*2-1, fontHeight, c==m_pOptions->m_fgColor ? bgColor : c );
10671067
}
10681068

1069+
//if no line then we fill a rectangle with pattern
1070+
if (srcLineIdx < 0)
1071+
{
1072+
p.setPen( QPen( Qt::gray, 1, Qt::DashLine) );
1073+
p.fillRect(xOffset + fontWidth-1, yOffset, p.window().width(), fontHeight, QBrush(Qt::lightGray, Qt::BDiagPattern));
1074+
}
1075+
10691076
if ( bFastSelectionRange )
10701077
{
10711078
p.fillRect( xOffset + fontWidth-1, yOffset, 3, fontHeight, m_pOptions->m_fgColor );
@@ -1075,13 +1082,6 @@ void DiffTextWindowData::writeLine(
10751082
int currSelectionyOffset = (fastSelectorLine1 - m_firstLine) * fontHeight;
10761083
p.drawLine( xOffset + 6, currSelectionyOffset, p.window().width(), currSelectionyOffset );
10771084
p.drawLine( xOffset + 6, currSelectionyOffset + (m_fastSelectorNofLines) *fontHeight-1, p.window().width(), currSelectionyOffset + (m_fastSelectorNofLines) *fontHeight-1);
1078-
1079-
//if no line then we fill a rectangle with pattern
1080-
if (srcLineIdx < 0)
1081-
{
1082-
p.setPen( QPen( Qt::gray, 1, Qt::DashLine) );
1083-
p.fillRect(xOffset + 9, yOffset, p.window().width(), fontHeight, QBrush(Qt::lightGray, Qt::BDiagPattern));
1084-
}
10851085
}
10861086

10871087
// Check if line needs a manual diff help mark

0 commit comments

Comments
 (0)