From: Andy Parkins Date: Thu, 08 Feb 2007 23:31:12 GMT Subject: [PATCH] qgit4: Add a header and set the font family appropriately to the log message Message-ID: <200702082331.13095.andyparkins@gmail.com> In-Reply-To: <200702082158.56463.andyparkins@gmail.com> I've moved the short log to be the first header row, and highlighted it more strongly. I've also set the font family of the log div based on TYPE_WRITER_FONT as suggested by Marco. Signed-off-by: Andy Parkins --- src/git.cpp | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/git.cpp b/src/git.cpp index 1fa4479..a0873b6 100644 --- a/src/git.cpp +++ b/src/git.cpp @@ -979,15 +979,25 @@ const QString Git::getDesc(SCRef sha, QRegExp& shortLogRE, QRegExp& longLogRE) { text = Qt::convertFromPlainText( c->longLog() ); else { text = "\n"; - text.append( "
\n" ); - text.append( QString("\n
Author " + c->author() - + "
Date") ); + "span.h { font-weight: bold; font-size: medium; }\n" + "div.l { white-space: pre; font-family: "; + text.append( TYPE_WRITER_FONT.family() ); + text.append( "; }\n" + "\n" ); + + text.append( "
\n" ); + text.append("\n"); + + text.append( QString("\n\n"); + if (!c->isUnApplied && !c->isApplied) { text.append("\n\n"); } text.append( "
" ); + text.append(colorMatch(c->shortLog(), shortLogRE)); + text.append("
Author " + c->author() + + "
Date") ); text.append(getLocalDate(c->authorDate())); text.append("
Parent ").append(c->parents() .join("
Parent ")); @@ -1016,8 +1026,7 @@ const QString Git::getDesc(SCRef sha, QRegExp& shortLogRE, QRegExp& longLogRE) { text.append("
\n" ); - text.append("\n\n
" + colorMatch(c->shortLog(), shortLogRE) + - '\n' + colorMatch(c->longLog(), longLogRE)); + text.append("\n\n
" + colorMatch(c->longLog(), longLogRE)); text.append( "
\n" ); } // text = Qt::convertFromPlainText(text); -- 1.5.0.rc1.gf4b6c