Make autoscrolling work at the bottom of the screen.

2005-05-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_list_auto_scroll): Make
	autoscrolling work at the bottom of the screen.
This commit is contained in:
Matthias Clasen 2005-05-26 17:26:29 +00:00 committed by Matthias Clasen
parent d625a99817
commit dc04c470a1
4 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_auto_scroll): Make
autoscrolling work at the bottom of the screen.
2005-05-26 Maciej Katafiasz <email@mathrick.org>
* docs/reference/gtk/tmpl/gtkentry.sgml:

View File

@ -1,3 +1,8 @@
2005-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_auto_scroll): Make
autoscrolling work at the bottom of the screen.
2005-05-26 Maciej Katafiasz <email@mathrick.org>
* docs/reference/gtk/tmpl/gtkentry.sgml:

View File

@ -1,3 +1,8 @@
2005-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_auto_scroll): Make
autoscrolling work at the bottom of the screen.
2005-05-26 Maciej Katafiasz <email@mathrick.org>
* docs/reference/gtk/tmpl/gtkentry.sgml:

View File

@ -3621,10 +3621,10 @@ gtk_combo_box_list_auto_scroll (GtkComboBox *combo_box,
value = adj->value - (tree_view->allocation.y - y + 1);
gtk_adjustment_set_value (adj, CLAMP (value, adj->lower, adj->upper - adj->page_size));
}
else if (y >= tree_view->allocation.y + tree_view->allocation.height &&
else if (y >= tree_view->allocation.height &&
adj->upper - adj->page_size > adj->value)
{
value = adj->value + (y - tree_view->allocation.y - tree_view->allocation.height + 1);
value = adj->value + (y - tree_view->allocation.height + 1);
gtk_adjustment_set_value (adj, CLAMP (value, 0.0, adj->upper - adj->page_size));
}
}