[gnome-calendar/wip/pandusonu/week-view] week-header: minor improvements on date selection
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/pandusonu/week-view] week-header: minor improvements on date selection
- Date: Wed, 14 Dec 2016 19:21:54 +0000 (UTC)
commit 33f1e4cd3154209f38310bf831d98ceb98fe8d08
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Dec 14 17:18:48 2016 -0200
week-header: minor improvements on date selection
src/views/gcal-week-header.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c
index 26724d0..9173206 100644
--- a/src/views/gcal-week-header.c
+++ b/src/views/gcal-week-header.c
@@ -231,7 +231,7 @@ on_button_released (GcalWeekHeader *self,
week_start = get_start_of_week (self->active_date);
selection_start = g_date_time_add_days (week_start, start);
- selection_end = g_date_time_add_days (week_start, end + 1);
+ selection_end = end == start ? g_date_time_ref (selection_start) : g_date_time_add_days (week_start, end +
1);
out_x = ltr ? (column_width * (column + 0.5)) : (width - column_width * (column + 0.5));
@@ -1212,7 +1212,7 @@ gcal_week_header_draw (GtkWidget *widget,
gtk_render_background (context, cr,
ALIGNED (start_x + selection_x),
start_y,
- selection_width,
+ ALIGNED (selection_width),
alloc.height - start_y);
gtk_style_context_restore (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]