[evolution/clutter-calendar-v2] More neat animations on load.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/clutter-calendar-v2] More neat animations on load.
- Date: Fri, 17 Sep 2010 03:26:41 +0000 (UTC)
commit 61ce79d475f4b609494f2b76adb6051567d432d2
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Fri Sep 17 08:53:00 2010 +0530
More neat animations on load.
calendar/gui/e-calendar-view.h | 1 +
calendar/gui/e-week-view-clutter-event-item.c | 10 ++++++++++
calendar/gui/e-week-view.c | 8 ++++++++
3 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index da63ac2..e377d32 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -82,6 +82,7 @@ typedef enum {
gint timeout; \
GdkColor *color; \
gboolean marked_for_delete; \
+ gboolean just_added; \
gint x,y;
typedef struct {
diff --git a/calendar/gui/e-week-view-clutter-event-item.c b/calendar/gui/e-week-view-clutter-event-item.c
index 3c7cbe4..e3c47b2 100644
--- a/calendar/gui/e-week-view-clutter-event-item.c
+++ b/calendar/gui/e-week-view-clutter-event-item.c
@@ -782,6 +782,9 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
return;
}
+ if (event->just_added)
+ clutter_actor_set_opacity (event_item, 0);
+
clutter_cairo_texture_clear (event_item->priv->texture);
cr = clutter_cairo_texture_create (event_item->priv->texture);
gradient = calendar_config_get_display_events_gradient ();
@@ -1181,6 +1184,13 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
cairo_destroy (cr);
gdk_region_destroy (draw_region);
+
+ if (event->just_added) {
+ event->just_added = FALSE;
+ clutter_actor_animate (event_item, CLUTTER_LINEAR,
+ 400, "opacity", 255, NULL);
+ }
+
}
static gint
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index b3ce842..659b33e 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1595,6 +1595,13 @@ e_week_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
+ clutter_actor_set_opacity (week_view->main_canvas_stage, 0);
+ //clutter_actor_set_opacity (week_view->titles_canvas_actor, 0);
+ clutter_actor_animate (week_view->main_canvas_stage, CLUTTER_LINEAR,
+ 1000, "opacity", 255, NULL);
+ //clutter_actor_animate (week_view->titles_canvas_actor, CLUTTER_LINEAR,
+ // 1000, "opacity", 255, NULL);
+
e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
}
#endif
@@ -3192,6 +3199,7 @@ e_week_view_add_event (ECalComponent *comp,
event.comp_data->instance_start = start;
event.comp_data->instance_end = end;
event.marked_for_delete = FALSE;
+ event.just_added = TRUE;
event.start_minute = start_tt.hour * 60 + start_tt.minute;
event.end_minute = end_tt.hour * 60 + end_tt.minute;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]