[gnome-calendar/gnome-3-24] week-grid: draw today indicator above events
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gnome-3-24] week-grid: draw today indicator above events
- Date: Tue, 16 May 2017 18:04:38 +0000 (UTC)
commit c932e3ed618ad701408b779aa01cb9ae4f8fe3bd
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 8309a11..68d0d87 100644
--- a/src/views/gcal-week-grid.c
+++ b/src/views/gcal-week-grid.c
@@ -515,6 +515,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));
@@ -552,42 +588,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]