summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-04 14:20:43 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-04 15:28:03 +0100
commit7424b86fb5fe67d008a283fcf1db5486e2c55d3b (patch)
tree4695a099fe8a18116bd17fdd3dd8e6c3435276a1
parent09272d9aeb7f84ae0ec719ca7e0068263ec09df3 (diff)
downloadefl-7424b86fb5fe67d008a283fcf1db5486e2c55d3b.tar.gz
efl_canvas_animation_group: remove implicit children behaviour
you could set the duration of the group to all children, however, the default behaviour was to not do that. This is however a bit probeblatic, and needs to be more expclicit. If this is needed again, then this can be reintroduced, however, not in this form. ref T8437 Depends on D10798 Differential Revision: https://phab.enlightenment.org/D10799
-rw-r--r--src/lib/evas/Evas_Common.h1
-rw-r--r--src/lib/evas/Evas_Eo.h1
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_group.c16
3 files changed, 3 insertions, 15 deletions
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 32cf83b60d..d7fa681094 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3482,7 +3482,6 @@ typedef Eo Efl_Animation_Group_Sequential;
#endif
-#define EFL_ANIMATION_GROUP_DURATION_NONE -1
#define EFL_ANIMATION_REPEAT_INFINITE -1
// The below type are necessary for legacy API and need to be manually kept in sync with .eo file.
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 58a1f01b6c..f156ec50a8 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -122,7 +122,6 @@ typedef Eo Efl_Canvas_Animation_Group_Sequential;
#endif
-#define EFL_ANIMATION_GROUP_DURATION_NONE -1
#define EFL_ANIMATION_REPEAT_INFINITE -1
struct _Efl_Canvas_Animation_Player_Event_Running
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group.c b/src/lib/evas/canvas/efl_canvas_animation_group.c
index 8673efd01e..b6a771501f 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_group.c
@@ -8,10 +8,7 @@ _efl_canvas_animation_group_animation_add(Eo *eo_obj,
if (!animation) return;
double duration = efl_animation_duration_get(efl_super(eo_obj, MY_CLASS));
- /* if group animation duration is available value, then the duration is
- * propagated to its child. */
- if (duration != EFL_ANIMATION_GROUP_DURATION_NONE)
- efl_animation_duration_set(animation, duration);
+ efl_animation_duration_set(animation, duration);
Eina_Bool keep_final_state = efl_animation_final_state_keep_get(eo_obj);
efl_animation_final_state_keep_set(animation, keep_final_state);
@@ -53,9 +50,8 @@ _efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
Efl_Canvas_Animation_Group_Data *pd,
double duration)
{
- if (duration == EFL_ANIMATION_GROUP_DURATION_NONE) goto end;
-
- if (duration < 0.0) return;
+ efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
+ duration = efl_animation_duration_get(eo_obj);
Eina_List *l;
Efl_Canvas_Animation *anim;
@@ -63,9 +59,6 @@ _efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
{
efl_animation_duration_set(anim, duration);
}
-
-end:
- efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
}
EOLIAN static void
@@ -106,9 +99,6 @@ _efl_canvas_animation_group_efl_object_constructor(Eo *eo_obj,
pd->animations = NULL;
- //group animation does not affect its child duration by default.
- efl_animation_duration_set(eo_obj, EFL_ANIMATION_GROUP_DURATION_NONE);
-
return eo_obj;
}