[gnome-calendar/wip/pandusonu/week-view] week-grid, week-header: improve rendering of vertical lines
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/pandusonu/week-view] week-grid, week-header: improve rendering of vertical lines
- Date: Wed, 7 Dec 2016 23:32:59 +0000 (UTC)
commit 60d2691e89ab7242bbb86cc92625be90e6619fb1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Dec 7 21:31:48 2016 -0200
week-grid, week-header: improve rendering of vertical lines
src/views/gcal-week-grid.c | 6 +++---
src/views/gcal-week-header.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/views/gcal-week-grid.c b/src/views/gcal-week-grid.c
index 9d04dbb..51288a5 100644
--- a/src/views/gcal-week-grid.c
+++ b/src/views/gcal-week-grid.c
@@ -370,14 +370,14 @@ gcal_week_grid_draw (GtkWidget *widget,
/* Vertical lines */
for (i = 0; i < 7; i++)
{
- cairo_move_to (cr, ((width) / 7) * i + 0.4, 0);
+ cairo_move_to (cr, ((width) / 7.0) * i + 0.4, 0);
cairo_rel_line_to (cr, 0, height);
}
/* Horizontal lines */
for (i = 1; i < 24; i++)
{
- cairo_move_to (cr, 0, (height / 24) * i + 0.4);
+ cairo_move_to (cr, 0, (height / 24.0) * i + 0.4);
cairo_rel_line_to (cr, width, 0);
}
@@ -388,7 +388,7 @@ gcal_week_grid_draw (GtkWidget *widget,
for (i = 0; i < 24; i++)
{
- cairo_move_to (cr, 0, (height / 24) * i + (height / 48) + 0.4);
+ cairo_move_to (cr, 0, (height / 24.0) * i + (height / 48.0) + 0.4);
cairo_rel_line_to (cr, width, 0);
}
diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c
index fc5d61a..2f95d56 100644
--- a/src/views/gcal-week-header.c
+++ b/src/views/gcal-week-header.c
@@ -934,7 +934,7 @@ gcal_week_header_draw (GcalWeekHeader *self,
current_cell = icaltime_day_of_week (*(self->active_date)) - 1;
current_cell = (7 + current_cell - self->first_weekday) % 7;
- cell_width = alloc.width / 7;
+ cell_width = alloc.width / 7.0;
pango_layout_get_pixel_size (layout, NULL, &font_height);
for (i = 0; i < 7; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]