textview: Use adjustment animations in gtk_text_view_scroll_to_iter()

This makes keyboard-triggered scrolling animated, as this function is
used underneath in order to make the cursor onscreen after it is
displaced.
This commit is contained in:
Carlos Garnacho
2014-07-08 15:22:24 +02:00
committed by Matthias Clasen
parent f7e983a4c9
commit 6aa8511495

View File

@ -2163,8 +2163,8 @@ gtk_text_view_scroll_to_iter (GtkTextView *text_view,
if (scroll_inc != 0)
{
gtk_adjustment_set_value (text_view->priv->vadjustment,
current_y_scroll + scroll_inc);
gtk_adjustment_animate_to_value (text_view->priv->vadjustment,
current_y_scroll + scroll_inc);
DV (g_print (" vert increment %d\n", scroll_inc));
}
@ -2200,8 +2200,8 @@ gtk_text_view_scroll_to_iter (GtkTextView *text_view,
if (scroll_inc != 0)
{
gtk_adjustment_set_value (text_view->priv->hadjustment,
current_x_scroll + scroll_inc);
gtk_adjustment_animate_to_value (text_view->priv->hadjustment,
current_x_scroll + scroll_inc);
DV (g_print (" horiz increment %d\n", scroll_inc));
}