aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-15 21:46:24 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-15 23:47:25 +0800
commitf77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1 (patch)
treeac8595b121b91c445515858d0faeab781c8c232f
parent676e1f544d851935cb2dc7781f4a5ff39c366b2f (diff)
downloadgsoc2013-empathy-f77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1.tar
gsoc2013-empathy-f77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1.tar.gz
gsoc2013-empathy-f77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1.tar.bz2
gsoc2013-empathy-f77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1.tar.lz
gsoc2013-empathy-f77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1.tar.xz
gsoc2013-empathy-f77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1.tar.zst
gsoc2013-empathy-f77a1b3b6b3ffa4b47cf2e3cfab2f25f8383a3c1.zip
contact-list-view: use new GTK+ style API (#636500)
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 1b11309f3..4679e06f8 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -951,29 +951,28 @@ contact_list_view_cell_set_background (EmpathyContactListView *view,
gboolean is_group,
gboolean is_active)
{
- GdkColor color;
- GtkStyle *style;
+ if (!is_group && is_active) {
+ GdkRGBA color;
+ GtkStyleContext *style;
- style = gtk_widget_get_style (GTK_WIDGET (view));
+ style = gtk_widget_get_style_context (GTK_WIDGET (view));
- if (!is_group && is_active) {
- color = style->bg[GTK_STATE_SELECTED];
+ gtk_style_context_get_background_color (style, GTK_STATE_FLAG_SELECTED,
+ &color);
/* Here we take the current theme colour and add it to
* the colour for white and average the two. This
* gives a colour which is inline with the theme but
* slightly whiter.
*/
- color.red = (color.red + (style->white).red) / 2;
- color.green = (color.green + (style->white).green) / 2;
- color.blue = (color.blue + (style->white).blue) / 2;
+ empathy_make_color_whiter (&color);
g_object_set (cell,
- "cell-background-gdk", &color,
+ "cell-background-rgba", &color,
NULL);
} else {
g_object_set (cell,
- "cell-background-gdk", NULL,
+ "cell-background-rgba", NULL,
NULL);
}
}