[elm_genlist] add zoom effect while item is added or deleted.
[framework/uifw/elementary.git] / src / lib / elm_genlist.c
index fa4870a..616dd88 100644 (file)
@@ -22,7 +22,8 @@ EAPI const char ELM_GENLIST_PAN_SMART_NAME[] = "elm_genlist_pan";
 #define GL_IT(_it) (_it->item)
 
 #define IS_ROOT_PARENT_IT(_it) \
-   ((_it->group) || (GL_IT(_it)->items && GL_IT(_it)->expanded_depth == 0)) \
+   ((_it->group) || ((GL_IT(_it)->items && GL_IT(_it)->expanded_depth == 0)  \
+                      &&(!(GL_IT(_it)->type & ELM_GENLIST_ITEM_TREE)))) \
 
 static const Evas_Smart_Interface *_smart_interfaces[] =
 {
@@ -7532,11 +7533,16 @@ _elm_genlist_fx_play(Evas_Object *obj)
           {
              elm_transit_effect_translation_add(fi->trans, fi->from.x, fi->from.y, fi->to.x, fi->to.y);
              elm_transit_effect_color_add(fi->trans, 0, 0, 0, 0, 255, 255, 255, 255);
+             if ((!sd->pinch_zoom_mode) && (!sd->expanded_item))
+               elm_transit_effect_zoom_add(fi->trans, 0.8, 1.0);
           }
         else if (fi->type == ELM_GEN_ITEM_FX_TYPE_DEL)
           {
+             _item_unhighlight(fi->it);
              elm_transit_effect_translation_add(fi->trans, fi->from.x, fi->from.y, fi->to.x, fi->to.y);
              elm_transit_effect_color_add(fi->trans, 255, 255, 255, 255, 0, 0, 0, 0);
+             if ((!sd->pinch_zoom_mode) && (!sd->expanded_item))
+               elm_transit_effect_zoom_add(fi->trans, 1.0, 0.8);
           }
         elm_transit_effect_add(fi->trans, _item_fx_op, fi, _item_fx_done);
         elm_transit_del_cb_set(fi->trans, _item_fx_del_cb, fi);