forked from AuroraMiddleware/gtk
treeview: Pass height to allocate as argument
Instead of exporting a function to query it.
This commit is contained in:
parent
b47ff72ebc
commit
f31a51a1c8
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user