[gnome-calendar] event-widget: add .timed style class to timed events



commit 7dd42d4186359f6601e31d1e2bf76bc898ab7a97
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Sep 14 11:28:11 2017 -0300

    event-widget: add .timed style class to timed events
    
    Another CSS tool for us to play with.

 src/gcal-event-widget.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-event-widget.c b/src/gcal-event-widget.c
index 6a75b47..3ebb50b 100644
--- a/src/gcal-event-widget.c
+++ b/src/gcal-event-widget.c
@@ -437,6 +437,19 @@ gcal_event_widget_set_event_internal (GcalEventWidget *self,
                           self->summary_label,
                           "label",
                           G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
+
+  /*
+   * If the event is a timed, single-day event, draw it differently
+   * from all-day or multi-day events.
+   */
+  if (!gcal_event_get_all_day (event) && !gcal_event_is_multiday (event))
+    {
+      GtkStyleContext *context;
+
+      context = gtk_widget_get_style_context (GTK_WIDGET (self));
+
+      gtk_style_context_add_class (context, "timed");
+    }
 }
 
 


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