evas: fix child position when the container is moved
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>
Sat, 11 Feb 2017 22:16:25 +0000 (23:16 +0100)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>
Sat, 11 Feb 2017 23:10:05 +0000 (00:10 +0100)
when the position of the container is changed the children should also be
repositioned, so setting the changed flag.

The visual effect where you saw that was in luncher where items of the
bar did not get fully up.

src/lib/evas/canvas/evas_box.eo
src/lib/evas/canvas/evas_object_box.c
src/lib/evas/canvas/evas_object_table.c
src/lib/evas/canvas/evas_table.eo

index 4f09158..247394e 100644 (file)
@@ -659,6 +659,7 @@ class Evas.Box (Efl.Canvas.Group.Clipped)
       class.constructor;
       Efl.Object.constructor;
       Efl.Gfx.size { set; }
+      Efl.Gfx.position { set; }
       Efl.Canvas.Group.group_calculate;
       Efl.Canvas.Group.group_add;
       Efl.Canvas.Group.group_del;
index 6a6b861..3ec1e3d 100644 (file)
@@ -437,6 +437,16 @@ _evas_box_efl_gfx_size_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Co
 }
 
 EOLIAN static void
+_evas_box_efl_gfx_position_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Coord x, Evas_Coord y)
+{
+   if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_MOVE , 0, x, y))
+     return;
+
+   efl_gfx_position_set(efl_super(o, MY_CLASS), x, y);
+   evas_object_smart_changed(o);
+}
+
+EOLIAN static void
 _evas_box_efl_canvas_group_group_calculate(Eo *o, Evas_Object_Box_Data *priv)
 {
    if (priv->layout.cb)
index 9375e97..5eea6f9 100644 (file)
@@ -942,6 +942,16 @@ _evas_table_efl_gfx_size_set(Eo *obj, Evas_Table_Data *_pd EINA_UNUSED, Evas_Coo
 }
 
 EOLIAN static void
+_evas_table_efl_gfx_position_set(Eo *obj, Evas_Table_Data *_pd EINA_UNUSED, Evas_Coord x, Evas_Coord y)
+{
+   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+     return;
+
+   efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+   evas_object_smart_changed(obj);
+}
+
+EOLIAN static void
 _evas_table_efl_canvas_group_group_calculate(Eo *o, Evas_Table_Data *priv)
 {
    Evas *e;
index 556cc00..d16488b 100644 (file)
@@ -218,6 +218,7 @@ class Evas.Table (Efl.Canvas.Group.Clipped)
       class.constructor;
       Efl.Object.constructor;
       Efl.Gfx.size { set; }
+      Efl.Gfx.position { set; }
       Efl.Canvas.Group.group_add;
       Efl.Canvas.Group.group_del;
       Efl.Canvas.Group.group_calculate;