diff options
author | Radek Doulik <rodo@ximian.com> | 2003-11-24 09:38:11 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2003-11-24 09:38:11 +0800 |
commit | 1496e35c9cd57e31eb58a1fa6792d60b842bf941 (patch) | |
tree | 46b10563d5e83d70a01146acc5fb79bc386798ed /mail/em-format-html-display.c | |
parent | f55887cb8903b8e6a27ce4682050e6668859ecc1 (diff) | |
download | gsoc2013-evolution-1496e35c9cd57e31eb58a1fa6792d60b842bf941.tar gsoc2013-evolution-1496e35c9cd57e31eb58a1fa6792d60b842bf941.tar.gz gsoc2013-evolution-1496e35c9cd57e31eb58a1fa6792d60b842bf941.tar.bz2 gsoc2013-evolution-1496e35c9cd57e31eb58a1fa6792d60b842bf941.tar.lz gsoc2013-evolution-1496e35c9cd57e31eb58a1fa6792d60b842bf941.tar.xz gsoc2013-evolution-1496e35c9cd57e31eb58a1fa6792d60b842bf941.tar.zst gsoc2013-evolution-1496e35c9cd57e31eb58a1fa6792d60b842bf941.zip |
use new colors (efh_text_html): ditto
2003-11-24 Radek Doulik <rodo@ximian.com>
* em-format-html.c (efh_text_plain): use new colors
(efh_text_html): ditto
* em-format-html-display.c (efhd_gtkhtml_realise): set new colors
according to style
* em-format-html.c (efh_init): init new colors
* em-format-html.h: added frame and content colors
svn path=/trunk/; revision=23477
Diffstat (limited to 'mail/em-format-html-display.c')
-rw-r--r-- | mail/em-format-html-display.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 3d57961537..ec606ec5d7 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -171,6 +171,31 @@ efhd_gtkhtml_realise(GtkHTML *html, EMFormatHTMLDisplay *efhd) efhd->formathtml.body_colour = ((r<<16) | (g<< 8) | b) & 0xffffff; +#undef SCALE +#define SCALE (174) + /* 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; + + if (r+b+g > 128*3) { + r = (r*SCALE) >> 8; + g = (g*SCALE) >> 8; + b = (b*SCALE) >> 8; + } else { + r = 128 - ((SCALE * r) >> 9); + g = 128 - ((SCALE * g) >> 9); + b = 128 - ((SCALE * b) >> 9); + } + + efhd->formathtml.frame_colour = ((r<<16) | (g<< 8) | b) & 0xffffff; + + r = style->base[GTK_STATE_NORMAL].red >> 8; + g = style->base[GTK_STATE_NORMAL].green >> 8; + b = style->base[GTK_STATE_NORMAL].blue >> 8; + + efhd->formathtml.content_colour = ((r<<16) | (g<< 8) | b) & 0xffffff; + r = style->text[state].red >> 8; g = style->text[state].green >> 8; b = style->text[state].blue >> 8; |