[gnome-builder/wip/chergert/gutter] check for highlight line when drawing



commit c030b2f077552342984c2fdff8e0eb940548a662
Author: Christian Hergert <chergert redhat com>
Date:   Sun Sep 17 22:28:46 2017 -0700

    check for highlight line when drawing

 libide/sourceview/ide-omni-gutter-renderer.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libide/sourceview/ide-omni-gutter-renderer.c b/libide/sourceview/ide-omni-gutter-renderer.c
index 90f3ec9..21e0012 100644
--- a/libide/sourceview/ide-omni-gutter-renderer.c
+++ b/libide/sourceview/ide-omni-gutter-renderer.c
@@ -755,6 +755,7 @@ ide_omni_gutter_renderer_draw (GtkSourceGutterRenderer      *renderer,
   IdeOmniGutterRenderer *self = (IdeOmniGutterRenderer *)renderer;
   GtkTextView *view;
   gboolean has_focus;
+  gboolean highlight_line;
   guint line;
 
   g_assert (IDE_IS_OMNI_GUTTER_RENDERER (self));
@@ -765,6 +766,7 @@ ide_omni_gutter_renderer_draw (GtkSourceGutterRenderer      *renderer,
   g_assert (end != NULL);
 
   view = gtk_source_gutter_renderer_get_view (GTK_SOURCE_GUTTER_RENDERER (self));
+  highlight_line = gtk_source_view_get_highlight_current_line (GTK_SOURCE_VIEW (view));
   has_focus = gtk_widget_has_focus (GTK_WIDGET (view));
 
   line = gtk_text_iter_get_line (begin);
@@ -784,7 +786,7 @@ ide_omni_gutter_renderer_draw (GtkSourceGutterRenderer      *renderer,
           gdk_cairo_set_source_rgba (cr, &self->stopped_bg);
           cairo_fill (cr);
         }
-      else if (has_focus && (state & GTK_SOURCE_GUTTER_RENDERER_STATE_CURSOR))
+      else if (highlight_line && has_focus && (state & GTK_SOURCE_GUTTER_RENDERER_STATE_CURSOR))
         {
           gdk_cairo_rectangle (cr, bg_area);
           gdk_cairo_set_source_rgba (cr, &self->current.bg);


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