[gnome-builder] editor: make background grid smaller.



commit df5c102270a6a7eac13d604c7f1712488c8785fd
Author: Christian Hergert <christian hergert me>
Date:   Wed Nov 19 02:44:44 2014 -0800

    editor: make background grid smaller.
    
    We also might want to consider highlighting every Nth line a bit darker.
    It might be getting to the point of too distracting though.

 src/editor/gb-source-view.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/editor/gb-source-view.c b/src/editor/gb-source-view.c
index 8dd1efc..1bddc8e 100644
--- a/src/editor/gb-source-view.c
+++ b/src/editor/gb-source-view.c
@@ -1381,7 +1381,8 @@ gb_source_view_real_draw_layer (GbSourceView     *view,
       pango_layout_get_pixel_size (layout, &grid_width, &grid_height);
       g_object_unref (layout);
 
-      grid_width *= 2;
+      /* each character becomes 2 stacked boxes. */
+      grid_height /= 2;
 
       if (lines.alpha == 0.0)
         gdk_rgba_parse (&lines, "rgba(.125,.125,.125,.025)");
@@ -1397,7 +1398,8 @@ gb_source_view_real_draw_layer (GbSourceView     *view,
        * settings. Sadly, I didn't expose those in public API so we have to
        * just keep them in sync here. 64 for X, height/2 for Y.
        */
-      x = (grid_width - (vis.x % grid_width)) - (64 / grid_width * grid_width) - grid_width + 1;
+      x = (grid_width - (vis.x % grid_width)) - (64 / grid_width * grid_width)
+        - grid_width + 1;
       y = (grid_height - (vis.y % grid_height))
           - (vis.height / 2 / grid_height * grid_height)
           - grid_height;


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