git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] qgit4: Add a header and set the font family appropriately to the log message
Date: Thu, 8 Feb 2007 23:31:12 +0000	[thread overview]
Message-ID: <200702082331.13095.andyparkins@gmail.com> (raw)
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 <andyparkins@gmail.com>
---
 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 = "<html><head><style type=\"text/css\">"
+				"tr.head { background-color: #a0a0e0 }\n"
 				"td.h { font-weight: bold; }\n"
 				"table { background-color: #e0e0f0; }\n"
-				"div.l { white-space: pre; font-family: Monospace; }\n"
-				"</style></head><body>\n";
-		text.append( "<div class='t'><table>\n" );
-		text.append( QString("<tr><td class='h'>Author</th> <td>" + c->author()
-					+ "</td></tr>\n<tr><td class='h'>Date</th><td>") );
+				"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"
+				"</style></head><body>\n" );
+
+		text.append( "<div class='t'><table border=0 cellspacing=0 cellpadding=2>\n" );
+		text.append("<tr class='head'> <th colspan=2> <span class='h'>" );
+		text.append(colorMatch(c->shortLog(), shortLogRE));
+		text.append("</span></th></tr>\n");
+
+		text.append( QString("<tr><td class='h'>Author</td> <td>" + c->author()
+					+ "</td></tr>\n<tr><td class='h'>Date</td><td>") );
 		text.append(getLocalDate(c->authorDate()));
 		text.append("</td></tr>\n");
+
 		if (!c->isUnApplied && !c->isApplied) {
 			text.append("<tr><td class='h'>Parent</td> <td>").append(c->parents()
 					.join("</td></tr>\n<tr><td class='h'>Parent</td> <td>"));
@@ -1016,8 +1026,7 @@ const QString Git::getDesc(SCRef sha, QRegExp& shortLogRE, QRegExp& longLogRE) {
 			text.append("</td></tr>\n");
 		}
 		text.append( "</table></div>\n" );
-		text.append("\n\n<div class='l'>    " + colorMatch(c->shortLog(), shortLogRE) +
-		            '\n' + colorMatch(c->longLog(), longLogRE));
+		text.append("\n\n<div class='l'>" + colorMatch(c->longLog(), longLogRE));
 		text.append( "</div></body></html>\n" );
 	}
 //	text = Qt::convertFromPlainText(text);
-- 
1.5.0.rc1.gf4b6c

  reply	other threads:[~2007-02-08 23:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 21:38 [PATCH] qgit: Default the log window to wider than the file list and set monospaced font Andy Parkins
2007-02-08  8:39 ` Marco Costalba
2007-02-08  9:46   ` Jakub Narebski
2007-02-08 10:20   ` Andy Parkins
2007-02-08 19:06     ` Marco Costalba
2007-02-08 19:12       ` Andy Parkins
2007-02-08 19:29         ` Marco Costalba
2007-02-08 19:51           ` Marco Costalba
2007-02-08 21:58             ` Andy Parkins
2007-02-08 23:31               ` Andy Parkins [this message]
2007-02-08 23:41                 ` [PATCH] qgit4: Add a header and set the font family appropriately to the log message Shawn O. Pearce
2007-02-08 23:58                   ` Junio C Hamano
2007-02-09  0:29                     ` Linus Torvalds
2007-02-09  0:43                       ` [PATCH] format-patch -n: make sorting easier by padding number Johannes Schindelin
2007-02-09  0:47                         ` Johannes Schindelin
2007-02-09  9:19                     ` [PATCH] qgit4: Add a header and set the font family appropriately to the log message Michael S. Tsirkin
2007-02-09  5:44                 ` Marco Costalba
2007-02-08 23:31               ` [PATCH] qgit4: Removed the monospace font override from the log viewer box Andy Parkins
2007-02-08 23:31               ` [PATCH] qgit4: Set a 5:1 stretch ratio on the left and right halves of the patch viewer Andy Parkins
2007-02-08 23:04           ` [PATCH] qgit: Default the log window to wider than the file list and set monospaced font Andy Parkins
2007-02-08 10:22   ` Andy Parkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200702082331.13095.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).