summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-05-26 17:26:29 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-05-26 17:26:29 +0000
commitdc04c470a1c138e54e12b80b5706610e19fa2de5 (patch)
tree50e4359ff2c087f78460bb5ccbbe4c54d3018903 /gtk/gtkcombobox.c
parentd625a99817e6b9a4b51d8bc70083ba70f85c143b (diff)
downloadgtk+-dc04c470a1c138e54e12b80b5706610e19fa2de5.tar.gz
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.
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r--gtk/gtkcombobox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index f03ebb7ace..e88dc485d1 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -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));
}
}