diff --git a/src/com/fsck/k9/helper/HtmlConverter.java b/src/com/fsck/k9/helper/HtmlConverter.java index e5ab099bd..42382d206 100644 --- a/src/com/fsck/k9/helper/HtmlConverter.java +++ b/src/com/fsck/k9/helper/HtmlConverter.java @@ -317,6 +317,7 @@ public class HtmlConverter { protected static final String QUOTE_COLOR_LEVEL_3 = "#8ae234"; protected static final String QUOTE_COLOR_LEVEL_4 = "#fcaf3e"; protected static final String QUOTE_COLOR_LEVEL_5 = "#e9b96e"; + private static final String K9MAIL_CSS_CLASS = "k9mail"; /** * Return an HTML hex color string for a given quote level. @@ -1230,16 +1231,34 @@ public class HtmlConverter { } private static String htmlifyMessageHeader() { - final String font = K9.messageViewFixedWidthFont() - ? "monospace" - : "sans-serif"; - return "
"; + return ""; } private static String htmlifyMessageFooter() { return ""; } + /** + * Dynamically generate a CSS style for {@code} elements. + * + *+ * The style incorporates the user's current preference + * setting for the font family used for plain text messages. + *
+ * + * @return + * A {@code "; + } + /** * Convert a plain text string into an HTML fragment. * @param text Plain text. diff --git a/src/com/fsck/k9/view/MessageWebView.java b/src/com/fsck/k9/view/MessageWebView.java index e673f4134..a70a1c3e1 100644 --- a/src/com/fsck/k9/view/MessageWebView.java +++ b/src/com/fsck/k9/view/MessageWebView.java @@ -11,6 +11,8 @@ import android.webkit.WebSettings; import android.widget.Toast; import com.fsck.k9.K9; import com.fsck.k9.R; +import com.fsck.k9.helper.HtmlConverter; + import java.lang.reflect.Method; import com.nobu_games.android.view.web.TitleBarWebView; @@ -171,6 +173,7 @@ public class MessageWebView extends TitleBarWebView { ":link, :link * { color: #CCFF33 !important }" + ":visited, :visited * { color: #551A8B !important } "; } + content += HtmlConverter.cssStylePre(); content += "" + text + "