Commit a1c9a475 authored by Joachim Eibl's avatar Joachim Eibl

- On Windows use config file .kdiff3rc next to kdiff3.exe if exists.

- In overwiev for two way diff show if only one side contains text.


git-svn-id: https://kdiff3.svn.sourceforge.net/svnroot/kdiff3/trunk@142 c8aa9fed-2811-0410-8543-893ada326672
parent a9a36fb9
......@@ -407,6 +407,12 @@ QString KStandardDirs::findResource(const QString& resource, const QString& /*ap
{
if (resource=="config")
{
#if defined(_WIN32) || defined(Q_OS_OS2)
QString exePath = QCoreApplication::applicationDirPath();
QString configPath = exePath + "/.kdiff3rc"; // This is useful for portable installations (e.g. on USB-Stick)
if ( QFile::exists( configPath ) )
return configPath;
#endif
QString home = QDir::homePath();
return home + "/.kdiff3rc";
}
......
......@@ -3028,18 +3028,36 @@ void Overview::drawColumn( QPainter& p, e_OverviewMode eOverviewMode, int x, int
break;
}
}
int x2 = x;
int w2 = w;
if ( ! m_bTripleDiff )
{
if ( d3l.lineA == -1 && d3l.lineB>=0 )
{
c = m_pOptions->m_colorA;
x2 = w/2;
w2 = x2;
}
if ( d3l.lineA >= 0 && d3l.lineB==-1 )
{
c = m_pOptions->m_colorB;
w2 = w/2;
}
}
if (!bWhiteSpaceChange || m_pOptions->m_bShowWhiteSpace )
{
// Make sure that lines with conflict are not overwritten.
if ( c == m_pOptions->m_colorForConflict )
{
p.fillRect(x+1, oldY, w, max2(1,y-oldY), bWhiteSpaceChange ? QBrush(c,Qt::Dense4Pattern) : QBrush(c) );
p.fillRect(x2+1, oldY, w2, max2(1,y-oldY), bWhiteSpaceChange ? QBrush(c,Qt::Dense4Pattern) : QBrush(c) );
oldConflictY = oldY;
}
else if ( c!=m_pOptions->m_bgColor && oldY>oldConflictY )
{
p.fillRect(x+1, oldY, w, max2(1,y-oldY), bWhiteSpaceChange ? QBrush(c,Qt::Dense4Pattern) : QBrush(c) );
p.fillRect(x2+1, oldY, w2, max2(1,y-oldY), bWhiteSpaceChange ? QBrush(c,Qt::Dense4Pattern) : QBrush(c) );
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment