treeview: use the CELL style class while doing cell size request

Since we use the same style class later when we draw them. Otherwise
we'll get inconsistent results for CSS borders/paddings between the two
cycles.
This commit is contained in:
Cosimo Cecchi 2014-05-04 20:00:16 +02:00
parent 0ff3f16da1
commit 2cbf3c66ef

View File

@ -6131,6 +6131,7 @@ validate_row (GtkTreeView *tree_view,
GtkTreePath *path)
{
GtkTreeViewColumn *column;
GtkStyleContext *context;
GList *list, *first_column, *last_column;
gint height = 0;
gint horizontal_separator;
@ -6179,6 +6180,10 @@ validate_row (GtkTreeView *tree_view,
first_column = first_column->next)
;
context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_CELL);
for (list = tree_view->priv->columns; list; list = list->next)
{
gint padding = 0;
@ -6244,6 +6249,8 @@ validate_row (GtkTreeView *tree_view,
retval = TRUE;
}
gtk_style_context_restore (context);
if (draw_hgrid_lines)
height += grid_line_width;