Mercurial > pidgin.yaz
changeset 25270:5da76be14fdd
Fixes a bug in the blist theme where a line appears only under the expander
author | Justin Rodriguez <ffdragon@soc.pidgin.im> |
---|---|
date | Sat, 30 Aug 2008 01:10:22 +0000 |
parents | 25af9b1994c8 |
children | 6ebabe0841a0 |
files | pidgin/gtkblist.c pidgin/gtkcellrendererexpander.c |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Thu Aug 28 13:25:32 2008 +0000 +++ b/pidgin/gtkblist.c Sat Aug 30 01:10:22 2008 +0000 @@ -6023,9 +6023,6 @@ bgcolor = pidgin_blist_theme_get_collapsed_background_color(theme); else bgcolor = pidgin_blist_theme_get_expanded_background_color(theme); - if (bgcolor == NULL) - bgcolor = &(gtkblist->treeview->style->bg[GTK_STATE_ACTIVE]); - path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter); expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(gtkblist->treeview), path); gtk_tree_path_free(path);
--- a/pidgin/gtkcellrendererexpander.c Thu Aug 28 13:25:32 2008 +0000 +++ b/pidgin/gtkcellrendererexpander.c Sat Aug 30 01:10:22 2008 +0000 @@ -228,7 +228,7 @@ } -static void pidgin_cell_renderer_expander_render (GtkCellRenderer *cell, +static void pidgin_cell_renderer_expander_render(GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, @@ -237,7 +237,7 @@ guint flags) { PidginCellRendererExpander *cellexpander = (PidginCellRendererExpander *) cell; - + gboolean set; gint width, height; GtkStateType state; @@ -270,7 +270,10 @@ cell_area->x + cell->xpad + (width / 2), cell_area->y + cell->ypad + (height / 2), cell->is_expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED); - if (cell->is_expanded) + + /* only draw the line if the color isn't set - this prevents a bug where the hline appears only under the expander */ + g_object_get(cellexpander, "cell-background-set", &set, NULL); + if (cell->is_expanded && !set) gtk_paint_hline (widget->style, window, state, NULL, widget, NULL, 0, widget->allocation.width, cell_area->y + cell_area->height); }