[gnome-calendar] Revert: month-view: fix cell rendering glitch



commit 298a0e56c2a8959a4ace7961aed394b22f941a2b
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Tue Nov 18 13:55:02 2014 -0500

    Revert: month-view: fix cell rendering glitch
    
    This was not the proper fix.

 src/gcal-month-view.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 8c8dd6f..676dd2e 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -721,15 +721,16 @@ gcal_month_view_draw (GtkWidget *widget,
                        (alloc.width / 7) * column, pos_y + 0.3,
                        alloc.width / 7, cell_height);
     }
-  /* final gap: drawn horizontally to the end */
-  i = days + 7 * february_gap;
-  if (i < 7 * (shown_rows == 5 ? 5 : 6))
+  /* final gap */
+  for (i = days + 7 * february_gap; i < 7 * (shown_rows == 5 ? 5 : 6); i++)
     {
-      pos_y = cell_height * ((i / 7) + lines_gap_for_5) + start_grid_y;
+      gint column = i % 7;
+      gint row = i / 7;
+      pos_y = ((alloc.height - start_grid_y ) / 6) * (row + lines_gap_for_5) + start_grid_y;
       cairo_rectangle (cr,
-                       (alloc.width / 7) * (i % 7),
+                       (alloc.width / 7) * column,
                        pos_y + 0.3,
-                       alloc.width, cell_height);
+                       alloc.width / 7, (alloc.height - start_grid_y ) / 6);
     }
   cairo_fill (cr);
 


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