[gnome-calendar] month-view: fix date calc on rtl languages



commit 004af2893f1c6a375324d106a70c7a2f3810c6d6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Feb 16 11:27:21 2016 +0900

    month-view: fix date calc on rtl languages

 src/gcal-month-view.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index e50e1a6..33667f0 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -1175,6 +1175,10 @@ gcal_month_view_size_allocate (GtkWidget     *widget,
               gint column = cell_idx % 7;
               gint day = cell_idx - priv->days_delay + 1;
 
+              /* Day number is calculated differently on RTL languages */
+              if (priv->k)
+                day = 7 * row + MIRROR (day % 7, 0, 7) - length;
+
               if (i != 0)
                 {
                   child_widget = gcal_event_widget_clone (GCAL_EVENT_WIDGET (child_widget));


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