aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-03-31 18:01:55 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-03-31 18:01:55 +0800
commit53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199 (patch)
treebfbdd6ccb084b61f4dd32e0cbb2e899b72e16d5b /addressbook/gui/widgets
parent0e3447e1da95111e3b12f3b3109e4f3e87f809e6 (diff)
downloadgsoc2013-evolution-53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199.tar
gsoc2013-evolution-53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199.tar.gz
gsoc2013-evolution-53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199.tar.bz2
gsoc2013-evolution-53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199.tar.lz
gsoc2013-evolution-53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199.tar.xz
gsoc2013-evolution-53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199.tar.zst
gsoc2013-evolution-53b7122d0ef5487ef0ab084d8d3f6d2fdf2a2199.zip
** Fix for bug #506347
2008-03-31 Milan Crha <mcrha@redhat.com> ** Fix for bug #506347 * gui/widgets/eab-contact-display.c: (eab_contact_display_render_compact): Inherit background colors from actual theme, do not use hardcoded one. svn path=/trunk/; revision=35290
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index c1e0cf98da..c6a8490b16 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -751,14 +751,33 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac
const char *str;
char *html;
EContactPhoto *photo;
+ guint bg_frame = 0x000000, bg_body = 0xEEEEEE;
+ GtkStyle *style;
+
+ style = gtk_widget_get_style (GTK_WIDGET (display));
+ if (style) {
+ gushort r, g, b;
+
+ r = style->black.red >> 8;
+ g = style->black.green >> 8;
+ b = style->black.blue >> 8;
+ bg_frame = ((r << 16) | (g << 8) | b) & 0xffffff;
+
+ #define DARKER(a) (((a) >= 0x22) ? ((a) - 0x22) : 0)
+ r = DARKER (style->bg[GTK_STATE_NORMAL].red >> 8);
+ g = DARKER (style->bg[GTK_STATE_NORMAL].green >> 8);
+ b = DARKER (style->bg[GTK_STATE_NORMAL].blue >> 8);
+ bg_body = ((r << 16) | (g << 8) | b) & 0xffffff;
+ #undef DARKER
+ }
gtk_html_stream_printf (html_stream,
- "<table width=\"100%%\" cellpadding=1 cellspacing=0 bgcolor=\"#000000\">"
+ "<table width=\"100%%\" cellpadding=1 cellspacing=0 bgcolor=\"#%06X\">"
"<tr><td valign=\"top\">"
- "<table width=\"100%%\" cellpadding=0 cellspacing=0 bgcolor=\"#eeeeee\">"
+ "<table width=\"100%%\" cellpadding=0 cellspacing=0 bgcolor=\"#%06X\">"
"<tr><td valign=\"top\">"
"<table>"
- "<tr><td valign=\"top\">");
+ "<tr><td valign=\"top\">", bg_frame, bg_body);
photo = e_contact_get (contact, E_CONTACT_PHOTO);
if (!photo)