[gnome-calendar] month-view : correct overflow label position on rtl



commit d9a775e2fe174d610fcc45ee4914ae458b1d1bcf
Author: Abdullahi Usman <abdullahismn7 gmail com>
Date:   Tue Aug 22 01:04:36 2017 +0100

    month-view : correct overflow label position on rtl
    
    The overflow layout displays "Other n events" when there are too much event
    that a cell can accomodate.
    
    But on rtl languages, due to the layering out of the cell, the position of the
    overflow is not renderend on the mirrored date.
    
    We fix that by mirroring the positon of the day on which the events occur so
    that the events can appear on the right day.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777427

 src/views/gcal-month-view.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/views/gcal-month-view.c b/src/views/gcal-month-view.c
index 3284a84..88d74e6 100644
--- a/src/views/gcal-month-view.c
+++ b/src/views/gcal-month-view.c
@@ -1729,7 +1729,7 @@ gcal_month_view_draw (GtkWidget *widget,
 
           /* FIXME: hardcoded padding of the number background */
           gtk_render_background (context, cr,
-                                 cell_width * (column - self->k),
+                                 cell_width * column,
                                  cell_height * (row + first_row_gap) + start_grid_y,
                                  cell_width, cell_height);
           gtk_render_layout (context, cr,
@@ -1797,6 +1797,9 @@ gcal_month_view_draw (GtkWidget *widget,
               gtk_style_context_get (context, state, "font", &ofont_desc, NULL);
             }
 
+          if (self->k)
+            column = MIRROR (column, 0, 7) - 1;
+
           overflow_layout = gtk_widget_create_pango_layout (widget, overflow_str);
 
           pango_layout_set_font_description (overflow_layout, ofont_desc);
@@ -2081,7 +2084,6 @@ gcal_month_view_motion_notify_event (GtkWidget      *widget,
   days = self->days_delay + icaltime_days_in_month (self->date->month, self->date->year);
 
   new_end_cell = gather_button_event_data (GCAL_MONTH_VIEW (widget), event->x, event->y, &hovered_indicator, 
NULL, NULL);
-  new_end_cell = real_cell (new_end_cell, self->k);
 
   if (self->start_mark_cell)
     {


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