Fixes #836. In gtk_xtext_scroll() always force line integral line boundary.
This commit is contained in:
parent
3f1994f3bf
commit
811caaaa3d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user