Fixes #307914 (Alexander Larsson), fixing some breakage caused by my

2005-06-17  Kristian Rietveld  <kris@gtk.org>

	Fixes #307914 (Alexander Larsson), fixing some breakage caused
	by my previous commit.

	* gtk/gtktreeview.c (validate_visible_area): force dy to be zero
	when it fits on a single page,
	(scroll_sync_handler): same here.
This commit is contained in:
Kristian Rietveld 2005-06-17 11:38:22 +00:00 committed by Kristian Rietveld
parent 2cc2c1781c
commit 51f11dd497
4 changed files with 38 additions and 1 deletions

View File

@ -1,3 +1,12 @@
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fixes #307914 (Alexander Larsson), fixing some breakage caused
by my previous commit.
* gtk/gtktreeview.c (validate_visible_area): force dy to be zero
when it fits on a single page,
(scroll_sync_handler): same here.
Thu Jun 16 15:33:42 2005 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkcursor-x11.c (update_cursor): remove unused variable.

View File

@ -1,3 +1,12 @@
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fixes #307914 (Alexander Larsson), fixing some breakage caused
by my previous commit.
* gtk/gtktreeview.c (validate_visible_area): force dy to be zero
when it fits on a single page,
(scroll_sync_handler): same here.
Thu Jun 16 15:33:42 2005 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkcursor-x11.c (update_cursor): remove unused variable.

View File

@ -1,3 +1,12 @@
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fixes #307914 (Alexander Larsson), fixing some breakage caused
by my previous commit.
* gtk/gtktreeview.c (validate_visible_area): force dy to be zero
when it fits on a single page,
(scroll_sync_handler): same here.
Thu Jun 16 15:33:42 2005 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkcursor-x11.c (update_cursor): remove unused variable.

View File

@ -4938,6 +4938,14 @@ validate_visible_area (GtkTreeView *tree_view)
need_redraw = TRUE;
}
else if (tree_view->priv->height <= tree_view->priv->vadjustment->page_size)
{
/* when we are not scrolling, we should never set dy to something
* else than zero. we update top_row to be in sync with dy = 0.
*/
gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment), 0);
gtk_tree_view_dy_to_top_row (tree_view);
}
else
gtk_tree_view_top_row_to_dy (tree_view);
@ -5235,7 +5243,9 @@ scroll_sync_handler (GtkTreeView *tree_view)
GDK_THREADS_ENTER ();
if (gtk_tree_row_reference_valid (tree_view->priv->top_row))
if (tree_view->priv->height <= tree_view->priv->vadjustment->page_size)
gtk_adjustment_set_value (GTK_ADJUSTMENT (tree_view->priv->vadjustment), 0);
else if (gtk_tree_row_reference_valid (tree_view->priv->top_row))
gtk_tree_view_top_row_to_dy (tree_view);
else
gtk_tree_view_dy_to_top_row (tree_view);