Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh;
Elm_Genlist_Item *it, *it2;
const Eina_List *l;
- double time = 0.4, t;
+ double time = 0.3, t;
int y, dy;
Eina_Bool check, end = EINA_FALSE;
- // static Eina_Bool first = EINA_TRUE;
int in = 0;
t = ((0.0 > (t = current_time_get() - wd->start_time)) ? 0.0 : t) / 1000;
evas_object_geometry_get(wd->pan_smart, &ox, &oy, &ow, &oh);
evas_output_viewport_get(evas_object_evas_get(wd->pan_smart), &cvx, &cvy, &cvw, &cvh);
if (t > time) end = EINA_TRUE;
+
+ it2 = elm_genlist_item_next_get(wd->expand_item);
+ while (it2)
+ {
+ if (wd->expand_item->expanded_depth == it2->expanded_depth) break;
+ it2 = elm_genlist_item_next_get(it2);
+ }
+ dy = 0;
+ if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
+ dy = it2->scrl_y - it2->old_scrl_y;
+ else if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT)
+ dy = wd->expand_item_gap;
+
+ if (t <= time)
+ {
+ y = ((1 - (1 - (t / time)) * (1 - (t /time))) * dy);
+ }
+ else
+ {
+ end = EINA_TRUE;
+ y = dy;
+ }
+
+ check = EINA_FALSE;
EINA_INLIST_FOREACH(wd->blocks, itb)
{
itb->w = wd->minw;
{
EINA_LIST_FOREACH(itb->items, l, it)
{
- if (wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)
- {
- it2 = it;
- check = EINA_FALSE;
- do {
- if(it2->parent == wd->expand_item) check = EINA_TRUE;
- it2 = it2->parent;
- } while(it2);
- if(check) continue;
- }
- dy = 0;
- //printf(" s: %d %d ", oy, oh);
- if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
- dy = it->scrl_y - it->old_scrl_y;
- else if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT)
- {
- // printf("%d %d\n", it->old_scrl_y, wd->expand_item_end);
- if(wd->expand_item_end < it->old_scrl_y)
- dy = wd->expand_item_gap;
- }
- else if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)
- {
- if (wd->expand_item_end < it->old_scrl_y)
- dy = wd->expand_item_gap;
- }
- if (t <= time)
- y = (1 * sin((t / time) * (M_PI / 2)) * dy);
- else
- {
- end = EINA_TRUE;
- y = dy;
- }
+ if (it == it2) check = EINA_TRUE;
+ if (!check) continue;
if (!it->old_scrl_y)
it->old_scrl_y = it->scrl_y;
-
-
if (it->old_scrl_y + y < oy + oh)
{
if (!it->realized) _item_realize(it, in, 0);
if (it->group_item) evas_object_raise(it->group_item->base.view);
}
+ }
+ }
+ }
- if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
+ if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
+ {
+ it = elm_genlist_item_prev_get(it2);
+ while(it)
+ {
+ if((it->scrl_y < it2->old_scrl_y + y) && (it->expanded_depth > it2->expanded_depth))
+ {
+ if(!it->effect_done)
{
- it2 = elm_genlist_item_prev_get(it);
- while(it2)
- {
- if((it2->scrl_y < it->old_scrl_y + y) && (it2->expanded_depth > it->expanded_depth))
- {
- if(!it2->effect_done)
- {
- //edje_object_signal_emit(it2->base.view, "elm,state,expand_flip", "");
- evas_object_move(it2->base.view, it2->scrl_x, it2->scrl_y);
- evas_object_show(it2->base.view);
- it2->effect_done = EINA_TRUE;
- }
- // break;
- }
- it2 = elm_genlist_item_prev_get(it2);
- }
+ edje_object_signal_emit(it->base.view, "flip_item", "");
+ evas_object_show(it->base.view);
+ it->effect_done = EINA_TRUE;
}
- else if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT)
+ }
+ it = elm_genlist_item_prev_get(it);
+ if (it->expanded_depth <= it2->expanded_depth) break;
+ }
+ }
+ else if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT)
+ {
+ it = elm_genlist_item_prev_get(it2);
+ while(it)
+ {
+ if((it->scrl_y > it2->old_scrl_y + y) && (it->expanded_depth > it2->expanded_depth))
+ {
+ if(!it->effect_done)
{
- it2 = elm_genlist_item_prev_get(it);
- while(it2)
- {
- if((it2->scrl_y > it->old_scrl_y + y) && (it2->expanded_depth > it->expanded_depth))
- {
- if(!it2->effect_done)
- {
- edje_object_signal_emit(it2->base.view, "elm,state,hide", "");
- it2->effect_done = EINA_TRUE;
- }
- }
- else
- break;
- it2 = elm_genlist_item_prev_get(it2);
- }
+ edje_object_signal_emit(it->base.view, "elm,state,hide", "");
+ it->effect_done = EINA_TRUE;
}
}
+ else
+ break;
+ it = elm_genlist_item_prev_get(it);
}
}
- // first = EINA_FALSE;
- // printf("\n");
if (end)
{
if (wd->item_moving_effect_timer)
}
}
}
- //evas_render(evas_object_evas_get(wd->obj));
wd->item_moving_effect_timer = NULL;
- // first = EINA_TRUE;
_item_auto_scroll(wd);
evas_object_lower(wd->alpha_bg);
Elm_Genlist_Item *it2;
Eina_List *l;
- // printf("%p is emited contract\n", it);
edje_object_signal_emit(it->base.view, "elm,state,contract_flip", "");
it->effect_done = EINA_FALSE;
if (it2->parent && it == it2->parent)
{
if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
- {
- edje_object_signal_emit(it2->base.view, "flip_item", "");
- if(check)
- evas_object_move(it2->base.view, -9999, -9999);
- else
- evas_object_show(it2->base.view);
- }
+ edje_object_signal_emit(it2->base.view, "elm,state,unvisible", "");
else if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT)
- _emit_contract(it2);
+ _emit_contract(it2);
}
}