1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-29 12:42:16 -05:00

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

View File

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