aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html-display.c
diff options
context:
space:
mode:
authorJohan Euphrosine <proppy@aminche.com>2008-04-28 21:16:48 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-04-28 21:16:48 +0800
commit2e6ea617fa702f5056cc15255a9b4fb52ca0458f (patch)
treee1531a1de3ecc650ee64165534a99951cdf83249 /mail/em-format-html-display.c
parent582233e1de6f3df345f7db437fdbce035e142b13 (diff)
downloadgsoc2013-evolution-2e6ea617fa702f5056cc15255a9b4fb52ca0458f.tar.gz
gsoc2013-evolution-2e6ea617fa702f5056cc15255a9b4fb52ca0458f.tar.zst
gsoc2013-evolution-2e6ea617fa702f5056cc15255a9b4fb52ca0458f.zip
** Fix for bug #529247
2008-04-28 Johan Euphrosine <proppy@aminche.com> ** Fix for bug #529247 * em-format-html.h (struct _EMFormatHTML): Add header_colour. * em-format-html-display.c (efhd_gtkhtml_realise): Use bg style properties for body_colour, fg for header_colour, darken for frame_colour, bg for content_colour. * em-format-html.c (efh_init), (efh_format_exec), (efh_init), (efh_text_plain), (efh_text_enriched), (efh_text_html), (efh_message_deliverystatus): Use header_colour for text color of the message header, body_colour for background color of the message header, text_colour for text color of the message content, base_colour for background color of the message content. svn path=/trunk/; revision=35429
Diffstat (limited to 'mail/em-format-html-display.c')
-rw-r--r--mail/em-format-html-display.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 48b9abc718..4c99d027ff 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -241,27 +241,22 @@ efhd_gtkhtml_realise(GtkHTML *html, EMFormatHTMLDisplay *efhd)
if (style) {
int state = GTK_WIDGET_STATE(html);
gushort r, g, b;
-#define DARKER(a,v) a = ((a) > (v)) ? ((a) - (v)) : 0
- /* choose a suitably darker or lighter colour */
- r = style->base[state].red >> 8;
- g = style->base[state].green >> 8;
- b = style->base[state].blue >> 8;
+ r = style->fg[state].red >> 8;
+ g = style->fg[state].green >> 8;
+ b = style->fg[state].blue >> 8;
- DARKER (r, 18);
- DARKER (g, 18);
- DARKER (b, 18);
+ efhd->formathtml.header_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
- efhd->formathtml.body_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
+ r = style->bg[state].red >> 8;
+ g = style->bg[state].green >> 8;
+ b = style->bg[state].blue >> 8;
- /* choose a suitably darker or lighter colour */
- r = style->base[state].red >> 8;
- g = style->base[state].green >> 8;
- b = style->base[state].blue >> 8;
+ efhd->formathtml.body_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
- DARKER (r, 82);
- DARKER (g, 82);
- DARKER (b, 82);
+ r = style->dark[state].red >> 8;
+ g = style->dark[state].green >> 8;
+ b = style->dark[state].blue >> 8;
efhd->formathtml.frame_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;