[gnome-builder] editor: use scroll helpers and tweak placement



commit 506ce32a4a0a2c69db746b863d887c8d407bb275
Author: Christian Hergert <chergert redhat com>
Date:   Wed Feb 6 14:05:24 2019 -0800

    editor: use scroll helpers and tweak placement
    
    I didn't test rigorously, but this improves things for me a bit on what
    I did test.
    
    Fixes #793

 src/libide/editor/ide-editor-search.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-search.c b/src/libide/editor/ide-editor-search.c
index d621fa981..d44c869e0 100644
--- a/src/libide/editor/ide-editor-search.c
+++ b/src/libide/editor/ide-editor-search.c
@@ -1382,7 +1382,13 @@ ide_editor_search_forward_cb (GObject      *object,
           else
             gtk_text_buffer_select_range (buffer, &begin, &begin);
 
-          gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (self->view), insert, 0.0, TRUE, 1.0, 0.5);
+          ide_source_view_scroll_to_mark (IDE_SOURCE_VIEW (self->view),
+                                          insert,
+                                          0.25,
+                                          IDE_SOURCE_SCROLL_BOTH,
+                                          1.0,
+                                          0.5,
+                                          FALSE);
 
           if (self->repeat > 0)
             {
@@ -1435,7 +1441,13 @@ ide_editor_search_backward_cb (GObject      *object,
           else
             gtk_text_buffer_select_range (buffer, &begin, &begin);
 
-          gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (self->view), insert, 0.0, TRUE, 1.0, 0.5);
+          ide_source_view_scroll_to_mark (IDE_SOURCE_VIEW (self->view),
+                                          insert,
+                                          0.25,
+                                          IDE_SOURCE_SCROLL_BOTH,
+                                          1.0,
+                                          0.5,
+                                          FALSE);
 
           if (self->repeat > 0)
             {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]