Skip to content

Commit 321b9ce

Browse files
Merge pull request #2 from michaelxzhang/develop
updated
2 parents bf8c9d3 + 50d1cd4 commit 321b9ce

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

kdiff3/src-QT4/difftextwindow.cpp

Lines changed: 7 additions & 8 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,14 +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::green, 1, Qt::DashLine) );
1083-
int currSelectionyOffset = (fastSelectorLine1 - m_firstLine) * fontHeight;
1084-
p.fillRect(xOffset + 6, currSelectionyOffset, p.window().width(), (m_fastSelectorNofLines) *fontHeight-1, Qt::BDiagPattern);
1085-
}
10861085
}
10871086

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

kdiff3/src-QT4/mergeresultwindow.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,20 @@ void MergeResultWindow::writeLine(
18531853
p.drawLine( xOffset+2, yOffset, xOffset+2, yOffset+fontHeight-1 );
18541854
p.drawLine( xOffset+3, yOffset, xOffset+3, yOffset+fontHeight-1 );*/
18551855
}
1856+
1857+
if (( rangeMark & 4 ) && ( rangeMark & 1))
1858+
{
1859+
//put a line at top and bottom of the current selected range
1860+
p.setPen( QPen( Qt::blue, 1, Qt::DashLine) );
1861+
p.drawLine( xOffset + 2, yOffset, p.window().width(), yOffset );
1862+
}
1863+
1864+
if (( rangeMark & 4 ) && ( rangeMark & 2))
1865+
{
1866+
//put a line at top and bottom of the current selected range
1867+
p.setPen( QPen( Qt::blue, 1, Qt::DashLine) );
1868+
p.drawLine( xOffset + 2, yOffset + fontHeight, p.window().width(), yOffset + fontHeight );
1869+
}
18561870
}
18571871

18581872
void MergeResultWindow::setPaintingAllowed(bool bPaintingAllowed)

kdiff3/src-QT4/optiondialog.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ void OptionDialog::setupColorPage( void )
682682
++line;
683683

684684
OptionColorButton* pDiffBgColor = new OptionColorButton(
685-
bLowColor ? QColor(Qt::lightGray) : qRgb(224,224,224), "DiffBgColor", &m_options.m_diffBgColor, page, this );
685+
bLowColor ? QColor(Qt::lightGray) : qRgb(255,205,189), "DiffBgColor", &m_options.m_diffBgColor, page, this );
686686
label = new QLabel( i18n("Diff background color:"), page );
687687
label->setBuddy(pDiffBgColor);
688688
gbox->addWidget( label, line, 0 );
@@ -720,16 +720,15 @@ void OptionDialog::setupColorPage( void )
720720
gbox->addWidget( pColorForConflict, line, 1 );
721721
++line;
722722

723-
OptionColorButton* pColor = new OptionColorButton(
724-
bLowColor ? qRgb(192,192,192) : qRgb(220,220,100), "CurrentRangeBgColor", &m_options.m_currentRangeBgColor, page, this );
723+
OptionColorButton* pColor = new OptionColorButton( Qt::white, "CurrentRangeBgColor", &m_options.m_currentRangeBgColor, page, this );
725724
label = new QLabel( i18n("Current range background color:"), page );
726725
label->setBuddy(pColor);
727726
gbox->addWidget( label, line, 0 );
728727
gbox->addWidget( pColor, line, 1 );
729728
++line;
730729

731730
pColor = new OptionColorButton(
732-
bLowColor ? qRgb(255,255,0) : qRgb(255,255,150), "CurrentRangeDiffBgColor", &m_options.m_currentRangeDiffBgColor, page, this );
731+
bLowColor ? qRgb(255,255,0) : qRgb(255,205,189), "CurrentRangeDiffBgColor", &m_options.m_currentRangeDiffBgColor, page, this );
733732
label = new QLabel( i18n("Current range diff background color:"), page );
734733
label->setBuddy(pColor);
735734
gbox->addWidget( label, line, 0 );

0 commit comments

Comments
 (0)