diff --git a/gtk/gtktreeprivate.h b/gtk/gtktreeprivate.h index bac7d80a39..0fc888ee3f 100644 --- a/gtk/gtktreeprivate.h +++ b/gtk/gtktreeprivate.h @@ -69,7 +69,6 @@ void _gtk_tree_view_install_mark_rows_col_dirty (GtkTreeView *tree_view, gboolean install_handler); void _gtk_tree_view_column_autosize (GtkTreeView *tree_view, GtkTreeViewColumn *column); -gint _gtk_tree_view_get_header_height (GtkTreeView *tree_view); void _gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view, GtkTreeViewRowSeparatorFunc *func, @@ -99,7 +98,8 @@ void _gtk_tree_view_column_set_tree_view (GtkTreeViewColumn *column, gint _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column); void _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column, int x_offset, - int width); + int width, + int height); void _gtk_tree_view_column_unset_model (GtkTreeViewColumn *column, GtkTreeModel *old_model); void _gtk_tree_view_column_unset_tree_view (GtkTreeViewColumn *column); diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index d8e78bb31b..7f8f3e5f62 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -2509,9 +2509,9 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget) column_width += extra_for_last; if (rtl) - _gtk_tree_view_column_allocate (column, widget_width - width - column_width, column_width); + _gtk_tree_view_column_allocate (column, widget_width - width - column_width, column_width, tree_view->priv->header_height); else - _gtk_tree_view_column_allocate (column, width, column_width); + _gtk_tree_view_column_allocate (column, width, column_width, tree_view->priv->header_height); width += column_width; } @@ -9723,14 +9723,8 @@ gtk_tree_view_get_effective_header_height (GtkTreeView *tree_view) { if (tree_view->priv->headers_visible) return tree_view->priv->header_height; - /* else */ - return 0; -} - -gint -_gtk_tree_view_get_header_height (GtkTreeView *tree_view) -{ - return tree_view->priv->header_height; + else + return 0; } void @@ -15769,7 +15763,7 @@ static gboolean gtk_tree_view_get_border (GtkScrollable *scrollable, GtkBorder *border) { - border->top = _gtk_tree_view_get_header_height (GTK_TREE_VIEW (scrollable)); + border->top = gtk_tree_view_get_effective_header_height (GTK_TREE_VIEW (scrollable)); return TRUE; } diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 34a603234a..872e8df29b 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -2013,7 +2013,8 @@ _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column) void _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column, int x_offset, - int width) + int width, + int height) { GtkTreeViewColumnPrivate *priv; GtkAllocation allocation = { 0, 0, 0, 0 }; @@ -2039,7 +2040,7 @@ _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column, allocation.x = x_offset; allocation.y = 0; allocation.width = width; - allocation.height = _gtk_tree_view_get_header_height (GTK_TREE_VIEW (priv->tree_view)); + allocation.height = height; gtk_widget_size_allocate (priv->button, &allocation, -1, &clip); }