diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-17 21:27:26 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-17 21:32:24 +0800 |
commit | 313c5081cb99cd116d51353f13827fa8c8e9e289 (patch) | |
tree | 6ed96d0dc1d63f35eded5a14b5c348ca41736c1e /libempathy-gtk | |
parent | 8c99779e5b055bc407ac2b8bf6bb26f4df63d555 (diff) | |
download | gsoc2013-empathy-313c5081cb99cd116d51353f13827fa8c8e9e289.tar gsoc2013-empathy-313c5081cb99cd116d51353f13827fa8c8e9e289.tar.gz gsoc2013-empathy-313c5081cb99cd116d51353f13827fa8c8e9e289.tar.bz2 gsoc2013-empathy-313c5081cb99cd116d51353f13827fa8c8e9e289.tar.lz gsoc2013-empathy-313c5081cb99cd116d51353f13827fa8c8e9e289.tar.xz gsoc2013-empathy-313c5081cb99cd116d51353f13827fa8c8e9e289.tar.zst gsoc2013-empathy-313c5081cb99cd116d51353f13827fa8c8e9e289.zip |
empathy_cell_renderer_expander_render: draw using the proper state (#642098)
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-cell-renderer-expander.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-cell-renderer-expander.c b/libempathy-gtk/empathy-cell-renderer-expander.c index b9c6544ca..53588d6fc 100644 --- a/libempathy-gtk/empathy-cell-renderer-expander.c +++ b/libempathy-gtk/empathy-cell-renderer-expander.c @@ -278,7 +278,7 @@ empathy_cell_renderer_expander_render (GtkCellRenderer *cell, EmpathyCellRendererExpanderPriv *priv; gint x_offset, y_offset; guint xpad, ypad; - + GtkStyleContext *style; expander = (EmpathyCellRendererExpander *) cell; priv = GET_PRIV (expander); @@ -293,12 +293,23 @@ empathy_cell_renderer_expander_render (GtkCellRenderer *cell, "ypad", &ypad, NULL); - gtk_render_expander (gtk_widget_get_style_context (widget), + style = gtk_widget_get_style_context (widget); + + gtk_style_context_save (style); + + if (priv->expander_style == GTK_EXPANDER_COLLAPSED) + gtk_style_context_set_state (style, GTK_STATE_NORMAL); + else + gtk_style_context_set_state (style, GTK_STATE_ACTIVE); + + gtk_render_expander (style, cr, cell_area->x + x_offset + xpad, cell_area->y + y_offset + ypad, priv->expander_size, priv->expander_size); + + gtk_style_context_restore (style); } static gboolean |