[gnome-calendar] month-view: don't draw dnd highlight on empty cells



commit 282fb5fc33123f724b853bcd745a7871cd6c34c5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Aug 14 23:42:49 2017 -0300

    month-view: don't draw dnd highlight on empty cells
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786102

 src/views/gcal-month-view.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/views/gcal-month-view.c b/src/views/gcal-month-view.c
index 38b8572..5df47f3 100644
--- a/src/views/gcal-month-view.c
+++ b/src/views/gcal-month-view.c
@@ -1635,6 +1635,9 @@ gcal_month_view_draw (GtkWidget *widget,
   gtk_style_context_save (context);
   gtk_style_context_add_class (context, "offset");
 
+  if (self->dnd_cell != -1)
+    gtk_drag_unhighlight (widget);
+
   /* Half-cell at the top and bottom */
   if (shown_rows == 5)
     {
@@ -1677,6 +1680,9 @@ gcal_month_view_draw (GtkWidget *widget,
                          cell_height + 1);
     }
 
+  if (self->dnd_cell != -1)
+    gtk_drag_highlight (widget);
+
   gtk_style_context_restore (context);
 
   /* grid numbers */
@@ -2287,6 +2293,7 @@ gcal_month_view_init (GcalMonthView *self)
 
   cancel_selection (self);
 
+  self->dnd_cell = -1;
   self->pressed_overflow_indicator = -1;
   self->hovered_overflow_indicator = -1;
 


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