[gnome-calendar] week-grid: draw today indicator above events



commit 89f142d79edd80f0bc9ce811eaff9318facc2ee2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Apr 12 14:20:35 2017 -0300

    week-grid: draw today indicator above events

 src/views/gcal-week-grid.c |   72 ++++++++++++++++++++++----------------------
 1 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/src/views/gcal-week-grid.c b/src/views/gcal-week-grid.c
index 126a33b..ced41fd 100644
--- a/src/views/gcal-week-grid.c
+++ b/src/views/gcal-week-grid.c
@@ -546,6 +546,42 @@ gcal_week_grid_draw (GtkWidget *widget,
                              cell_height);
     }
 
+  /* Vertical lines */
+  for (i = 0; i < 7; i++)
+    {
+      if (ltr)
+        x = column_width * i;
+      else
+        x = width - column_width * i;
+
+      cairo_move_to (cr, ALIGNED (x), 0);
+      cairo_rel_line_to (cr, 0, height);
+    }
+
+  /* Horizontal lines */
+  for (i = 1; i < 24; i++)
+    {
+      cairo_move_to (cr, 0, ALIGNED ((height / 24.0) * i));
+      cairo_rel_line_to (cr, width, 0);
+    }
+
+  cairo_stroke (cr);
+
+  /* Dashed lines between the vertical lines */
+  cairo_set_dash (cr, dashed, 2, 0);
+
+  for (i = 0; i < 24; i++)
+    {
+      cairo_move_to (cr, 0, ALIGNED ((height / 24.0) * i + (height / 48.0)));
+      cairo_rel_line_to (cr, width, 0);
+    }
+
+  cairo_stroke (cr);
+
+  gtk_style_context_restore (context);
+
+  GTK_WIDGET_CLASS (gcal_week_grid_parent_class)->draw (widget, cr);
+
   /* Today column */
   today_column = get_today_column (GCAL_WEEK_GRID (widget));
 
@@ -583,42 +619,6 @@ gcal_week_grid_draw (GtkWidget *widget,
       gtk_style_context_restore (context);
     }
 
-  /* Vertical lines */
-  for (i = 0; i < 7; i++)
-    {
-      if (ltr)
-        x = column_width * i;
-      else
-        x = width - column_width * i;
-
-      cairo_move_to (cr, ALIGNED (x), 0);
-      cairo_rel_line_to (cr, 0, height);
-    }
-
-  /* Horizontal lines */
-  for (i = 1; i < 24; i++)
-    {
-      cairo_move_to (cr, 0, ALIGNED ((height / 24.0) * i));
-      cairo_rel_line_to (cr, width, 0);
-    }
-
-  cairo_stroke (cr);
-
-  /* Dashed lines between the vertical lines */
-  cairo_set_dash (cr, dashed, 2, 0);
-
-  for (i = 0; i < 24; i++)
-    {
-      cairo_move_to (cr, 0, ALIGNED ((height / 24.0) * i + (height / 48.0)));
-      cairo_rel_line_to (cr, width, 0);
-    }
-
-  cairo_stroke (cr);
-
-  gtk_style_context_restore (context);
-
-  GTK_WIDGET_CLASS (gcal_week_grid_parent_class)->draw (widget, cr);
-
   /* Fire the redraw timeout if needed */
   if (self->redraw_timeout_id == 0)
     {


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