forked from enlightenment/efl
Dont need recalc params in external description in part_recalc.
Others types, like TEXT/TEXTBLOCK/SWALLOW/GROUP (others?), are similar to Externals. And may can recalc some properties only in description_apply, not on every call to part_recalc. Some generic boolean properties, like "visible", can be moved to description_appy too. SVN revision: 48144
This commit is contained in:
parent
abc78c3d9a
commit
a3333361f5
|
@ -107,6 +107,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
{
|
||||
Edje_Part_Description *epd1;
|
||||
Edje_Part_Description *epd2 = NULL;
|
||||
Edje_Part_Description *chosen_desc;
|
||||
|
||||
if (!d1) d1 = "default";
|
||||
|
||||
|
@ -115,7 +116,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
epd1 = ep->part->default_desc; /* never NULL */
|
||||
|
||||
if (d2)
|
||||
epd2 = _edje_part_description_find(ed, ep, d2, v2);
|
||||
epd2 = _edje_part_description_find(ed, ep, d2, v2);
|
||||
|
||||
/* There is an animation if both description are different or if description is an image with tweens */
|
||||
if (epd2 != NULL && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epd2->image.tween_list)))
|
||||
|
@ -135,6 +136,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
ep->param2 = NULL;
|
||||
}
|
||||
|
||||
chosen_desc = ep->chosen_description;
|
||||
ep->param1.description = epd1;
|
||||
ep->chosen_description = epd1;
|
||||
|
||||
|
@ -183,6 +185,10 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
ep->chosen_description = epd2;
|
||||
}
|
||||
|
||||
if (chosen_desc != ep->chosen_description &&
|
||||
ep->part->type == EDJE_PART_TYPE_EXTERNAL)
|
||||
_edje_external_recalc_apply(ed, ep, NULL, chosen_desc);
|
||||
|
||||
ed->dirty = 1;
|
||||
#ifdef EDJE_CALC_CACHE
|
||||
ep->invalidate = 1;
|
||||
|
@ -1996,8 +2002,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
_edje_table_recalc_apply(ed, ep, pf, chosen_desc);
|
||||
break;
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
_edje_external_recalc_apply(ed, ep, pf, chosen_desc);
|
||||
break;
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
|
|
|
@ -1814,11 +1814,7 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
|
|||
|
||||
/* Create default description */
|
||||
edje_edit_state_add(obj, name, "default", 0.0);
|
||||
|
||||
rp->param1.description = ep->default_desc;
|
||||
rp->chosen_description = rp->param1.description;
|
||||
|
||||
edje_object_calc_force(obj);
|
||||
edje_edit_part_selected_state_set(obj, name, "default", 0.0);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -619,6 +619,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
{
|
||||
_edje_real_part_swallow(rp, child_obj);
|
||||
rp->param1.external_params = _edje_external_params_parse(child_obj, rp->param1.description->external_params);
|
||||
_edje_external_recalc_apply(ed, rp, NULL, rp->chosen_description);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue