Fixes #836. In gtk_xtext_scroll() always force line integral line boundary.

This commit is contained in:
RichardHitt 2013-11-11 12:55:38 -08:00
parent 3f1994f3bf
commit 811caaaa3d
1 changed files with 2 additions and 2 deletions

View File

@ -2147,14 +2147,14 @@ gtk_xtext_scroll (GtkWidget *widget, GdkEventScroll *event)
new_value = xtext->adj->value - (xtext->adj->page_increment / 10);
if (new_value < xtext->adj->lower)
new_value = xtext->adj->lower;
gtk_adjustment_set_value (xtext->adj, new_value);
gtk_adjustment_set_value (xtext->adj, (int)new_value);
}
else if (event->direction == GDK_SCROLL_DOWN) /* mouse wheel pageDn */
{
new_value = xtext->adj->value + (xtext->adj->page_increment / 10);
if (new_value > (xtext->adj->upper - xtext->adj->page_size))
new_value = xtext->adj->upper - xtext->adj->page_size;
gtk_adjustment_set_value (xtext->adj, new_value);
gtk_adjustment_set_value (xtext->adj, (int)new_value);
}
return FALSE;