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:
committed by
Matthias Clasen
parent
f7e983a4c9
commit
6aa8511495
@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user