mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-26 03:02:17 -05:00
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);
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user