forked from enlightenment/efl
Elementary genlist: Refactoring.
1. Changed int for 0/1 to Eina_Bool. 2. Removed unnecessary variable. Don't need to assign macro to variable. Just use macro. 3. Fixed indentation. SVN revision: 60086
This commit is contained in:
parent
65a345438e
commit
da9848bc17
|
@ -2170,7 +2170,7 @@ _item_unrealize(Elm_Genlist_Item *it,
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_item_block_recalc(Item_Block *itb,
|
_item_block_recalc(Item_Block *itb,
|
||||||
int in,
|
int in,
|
||||||
int qadd)
|
Eina_Bool qadd)
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Elm_Genlist_Item *it;
|
Elm_Genlist_Item *it;
|
||||||
|
@ -2304,13 +2304,12 @@ _reorder_move_animator_cb(void *data)
|
||||||
{
|
{
|
||||||
Elm_Genlist_Item *it = data;
|
Elm_Genlist_Item *it = data;
|
||||||
Eina_Bool down = EINA_FALSE;
|
Eina_Bool down = EINA_FALSE;
|
||||||
double time, t;
|
double t;
|
||||||
int y, dy = it->h / 10 * _elm_config->scale, diff;
|
int y, dy = it->h / 10 * _elm_config->scale, diff;
|
||||||
time = REORDER_EFFECT_TIME;
|
|
||||||
|
|
||||||
t = ((0.0 > (t = ecore_loop_time_get()-it->wd->start_time)) ? 0.0 : t);
|
t = ((0.0 > (t = ecore_loop_time_get()-it->wd->start_time)) ? 0.0 : t);
|
||||||
|
|
||||||
if (t <= time) y = (1 * sin((t / time) * (M_PI / 2)) * dy);
|
if (t <= REORDER_EFFECT_TIME) y = (1 * sin((t / REORDER_EFFECT_TIME) * (M_PI / 2)) * dy);
|
||||||
else y = dy;
|
else y = dy;
|
||||||
|
|
||||||
diff = abs(it->old_scrl_y - it->scrl_y);
|
diff = abs(it->old_scrl_y - it->scrl_y);
|
||||||
|
@ -2528,7 +2527,7 @@ _calc_job(void *data)
|
||||||
itb->must_recalc = EINA_FALSE;
|
itb->must_recalc = EINA_FALSE;
|
||||||
}
|
}
|
||||||
if (itb->realized) _item_block_unrealize(itb);
|
if (itb->realized) _item_block_unrealize(itb);
|
||||||
showme = _item_block_recalc(itb, in, 0);
|
showme = _item_block_recalc(itb, in, EINA_FALSE);
|
||||||
chb = itb;
|
chb = itb;
|
||||||
}
|
}
|
||||||
itb->y = y;
|
itb->y = y;
|
||||||
|
@ -2670,7 +2669,7 @@ _update_job(void *data)
|
||||||
{
|
{
|
||||||
position = EINA_TRUE;
|
position = EINA_TRUE;
|
||||||
itb->changed = EINA_TRUE;
|
itb->changed = EINA_TRUE;
|
||||||
_item_block_recalc(itb, num0, 0);
|
_item_block_recalc(itb, num0, EINA_FALSE);
|
||||||
_item_block_position(itb, num0);
|
_item_block_position(itb, num0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3384,7 +3383,7 @@ _queue_process(Widget_Data *wd)
|
||||||
t = ecore_time_get();
|
t = ecore_time_get();
|
||||||
if (it->block->changed)
|
if (it->block->changed)
|
||||||
{
|
{
|
||||||
showme = _item_block_recalc(it->block, it->block->num, 1);
|
showme = _item_block_recalc(it->block, it->block->num, EINA_TRUE);
|
||||||
it->block->changed = 0;
|
it->block->changed = 0;
|
||||||
}
|
}
|
||||||
if (showme) it->block->showme = EINA_TRUE;
|
if (showme) it->block->showme = EINA_TRUE;
|
||||||
|
|
Loading…
Reference in New Issue