forked from enlightenment/efl
edje: do not move object until all positionning information is known.
This commit is contained in:
parent
a76633b930
commit
1927bcea91
|
@ -1462,7 +1462,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
|
|||
free(sfont);
|
||||
params->type.text.size = size; /* XXX TODO used by further calcs, go inside recalc_apply? */
|
||||
|
||||
_edje_text_recalc_apply(ed, ep, params, chosen_desc);
|
||||
_edje_text_recalc_apply(ed, ep, params, chosen_desc, EINA_TRUE);
|
||||
|
||||
if ((!chosen_desc) ||
|
||||
((!chosen_desc->text.min_x) && (!chosen_desc->text.min_y) &&
|
||||
|
@ -3813,7 +3813,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
switch (ep->part->type)
|
||||
{
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
_edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc);
|
||||
_edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc, EINA_FALSE);
|
||||
break;
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
_edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy*) chosen_desc, pos);
|
||||
|
|
|
@ -2013,7 +2013,8 @@ void _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
|
|||
void _edje_text_recalc_apply(Edje *ed,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Calc_Params *params,
|
||||
Edje_Part_Description_Text *chosen_desc);
|
||||
Edje_Part_Description_Text *chosen_desc,
|
||||
Eina_Bool calc_only);
|
||||
Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
|
||||
const char * _edje_text_class_font_get(Edje *ed,
|
||||
Edje_Part_Description_Text *chosen_desc,
|
||||
|
|
|
@ -161,7 +161,8 @@ _edje_text_class_font_get(Edje *ed, Edje_Part_Description_Text *chosen_desc, int
|
|||
void
|
||||
_edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||
Edje_Calc_Params *params,
|
||||
Edje_Part_Description_Text *chosen_desc)
|
||||
Edje_Part_Description_Text *chosen_desc,
|
||||
Eina_Bool calc_only)
|
||||
{
|
||||
const char *text = NULL;
|
||||
const char *font;
|
||||
|
@ -442,12 +443,15 @@ arrange_text:
|
|||
ep->typedata.text->offset.y = TO_INT(SCALE(params->type.text.align.y, (sh - th)));
|
||||
}
|
||||
|
||||
evas_object_move(ep->object,
|
||||
ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x,
|
||||
ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
|
||||
if (!calc_only)
|
||||
{
|
||||
evas_object_move(ep->object,
|
||||
ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x,
|
||||
ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
|
||||
|
||||
if (params->visible) evas_object_show(ep->object);
|
||||
else evas_object_hide(ep->object);
|
||||
if (params->visible) evas_object_show(ep->object);
|
||||
else evas_object_hide(ep->object);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue