[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/plugins/kmail/bodypartformatter
From: Ingo Klöcker <kloecker () kde ! org>
Date: 2004-08-22 23:30:04
Message-ID: 20040822233004.B971A2737 () office ! kde ! org
[Download RAW message or body]
CVS commit by kloecker:
Use <pre> which fixes unwanted whitespace compression.
M +17 -16 text_xdiff.cpp 1.3
--- kdepim/plugins/kmail/bodypartformatter/text_xdiff.cpp #1.2:1.3
@@ -54,4 +54,8 @@
namespace {
+
+ // TODO: Show filename header to make it possible to save the patch.
+ // FIXME: The box should only be as wide as necessary.
+
class Formatter : public KMail::Interface::BodyPartFormatter {
public:
@@ -67,29 +71,25 @@ namespace {
QString addedLineStyle = QString::fromLatin1(
"style=\""
- "padding-left: 4px; "
- "font-family: monospace; "
- //"border-right: #000 dashed 1px; "
"color: green;\"");
- QString fileAddStyle( "style=\"font-weight: bold; font-family: monospace; color: green; \"" );
+ QString fileAddStyle( "style=\"font-weight: bold; "
+ "color: green; \"" );
QString removedLineStyle = QString::fromLatin1(
"style=\""
- "padding-left: 4px; "
- "font-family: monospace; "
"color: red;\"");
- QString fileRemoveStyle( "style=\"font-weight: bold; font-family: monospace; color: red ;\"" );
+ QString fileRemoveStyle( "style=\"font-weight: bold; "
+ "color: red ;\"" );
QString tableStyle = QString::fromLatin1(
"style=\""
- "border: dashed 1px; "
+ "border: solid black 1px; "
+ "padding: 0.5em; "
"margin: 0em;\"");
- QString sepStyle( "style=\"color: black; font-weight: bold; font-family: monospace; \"" );
- QString chunkStyle( "style=\"color: blue; font-family: monospace; \"" );
-
- QString regularStyle( "style=\"font-family: monospace;\"" );
+ QString sepStyle( "style=\"color: black; font-weight: bold;\"" );
+ QString chunkStyle( "style=\"color: blue;\"" );
QString html = "<br><div align=\"center\">";
- html += "<table " + tableStyle +">";
+ html += "<pre " + tableStyle + ">";
QStringList lines = QStringList::split( '\n', diff, true );
@@ -111,11 +111,12 @@ namespace {
style = chunkStyle;
} else {
- style = regularStyle;
+ style = "";
}
}
- html += "<tr><td " + style + ">" + line + "</td></tr>";
+ html += "<span " + style + ">" + line + "</span>\n";
}
- html += "</table></div>";
+ html += "</pre></div>";
+ //qDebug( "%s", html.latin1() );
writer->queue( html );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic