Commit f396a237 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld
Browse files

fixup adjustments and top_row if the current dy + page_size exceeds the

2006-01-14  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate),
	(validate_visible_area): fixup adjustments and top_row if the
	current dy + page_size exceeds the new tree view height. (Fixes
	#316689, reported by Chris Lord).
parent fcfefedd
2006-01-14 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate),
(validate_visible_area): fixup adjustments and top_row if the
current dy + page_size exceeds the new tree view height. (Fixes
#316689, reported by Chris Lord).
2006-01-13 Matthias Clasen <mclasen@redhat.com> 2006-01-13 Matthias Clasen <mclasen@redhat.com>
* */abicheck.sh: Make this work on more platforms. * */abicheck.sh: Make this work on more platforms.
......
2006-01-14 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate),
(validate_visible_area): fixup adjustments and top_row if the
current dy + page_size exceeds the new tree view height. (Fixes
#316689, reported by Chris Lord).
2006-01-13 Matthias Clasen <mclasen@redhat.com> 2006-01-13 Matthias Clasen <mclasen@redhat.com>
* */abicheck.sh: Make this work on more platforms. * */abicheck.sh: Make this work on more platforms.
......
...@@ -2129,6 +2129,9 @@ gtk_tree_view_size_allocate (GtkWidget *widget, ...@@ -2129,6 +2129,9 @@ gtk_tree_view_size_allocate (GtkWidget *widget,
/* now the adjustments and window sizes are in sync, we can sync toprow/dy again */ /* now the adjustments and window sizes are in sync, we can sync toprow/dy again */
if (tree_view->priv->height <= tree_view->priv->vadjustment->page_size) if (tree_view->priv->height <= tree_view->priv->vadjustment->page_size)
gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment), 0); gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment), 0);
else if (tree_view->priv->vadjustment->value + tree_view->priv->vadjustment->page_size > tree_view->priv->height)
gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment),
tree_view->priv->height - tree_view->priv->vadjustment->page_size);
else if (gtk_tree_row_reference_valid (tree_view->priv->top_row)) else if (gtk_tree_row_reference_valid (tree_view->priv->top_row))
gtk_tree_view_top_row_to_dy (tree_view); gtk_tree_view_top_row_to_dy (tree_view);
else else
...@@ -5067,6 +5070,11 @@ validate_visible_area (GtkTreeView *tree_view) ...@@ -5067,6 +5070,11 @@ validate_visible_area (GtkTreeView *tree_view)
gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment), 0); gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment), 0);
gtk_tree_view_dy_to_top_row (tree_view); gtk_tree_view_dy_to_top_row (tree_view);
} }
else if (tree_view->priv->vadjustment->value + tree_view->priv->vadjustment->page_size > tree_view->priv->height)
{
gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment), tree_view->priv->height - tree_view->priv->vadjustment->page_size);
gtk_tree_view_dy_to_top_row (tree_view);
}
else else
gtk_tree_view_top_row_to_dy (tree_view); gtk_tree_view_top_row_to_dy (tree_view);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment