[gnome-builder] source-view: fix snippet background drawing



commit 9b5a9b0ea21221bada076bd1a586e2754258d6b6
Author: Christian Hergert <christian hergert me>
Date:   Fri Mar 4 14:56:51 2016 -0800

    source-view: fix snippet background drawing
    
    This is in a new coordinate space now that we are in BELOW_TEXT. Translate
    the coordinates into the buffer coordinates.

 libide/ide-source-view.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index a9d506d..8b4a1eb 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -4183,6 +4183,8 @@ ide_source_view_draw_snippet_background (IdeSourceView    *self,
 
   get_rect_for_iters (text_view, &begin, &end, &r, GTK_TEXT_WINDOW_TEXT);
 
+  gtk_text_view_window_to_buffer_coords (text_view, GTK_TEXT_WINDOW_TEXT, r.x, r.y, &r.x, &r.y);
+
   ide_cairo_rounded_rectangle (cr, &r, 5, 5);
 
   cairo_fill (cr);


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