forked from enlightenment/efl
fix calling edje api on objects that may not be edje objects...
This commit is contained in:
parent
59bd729ca9
commit
b851e10caf
|
@ -361,28 +361,30 @@ _scale_set(Eo *obj, void *_pd, va_list *list)
|
||||||
double scale = va_arg(*list, double);
|
double scale = va_arg(*list, double);
|
||||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
if (ret) *ret = EINA_TRUE;
|
if (ret) *ret = EINA_TRUE;
|
||||||
|
|
||||||
Edje *ed, *ged;
|
Edje *ed, *ged;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
ed = _pd;
|
ed = _pd;
|
||||||
if (ed->scale == scale) return;
|
if (ed->scale == scale) return;
|
||||||
ed->scale = FROM_DOUBLE(scale);
|
ed->scale = FROM_DOUBLE(scale);
|
||||||
EINA_LIST_FOREACH(ed->groups, l, ged)
|
EINA_LIST_FOREACH(ed->groups, l, ged)
|
||||||
ged->scale = ed->scale;
|
ged->scale = ed->scale;
|
||||||
EINA_LIST_FOREACH(ed->subobjs, l, o)
|
EINA_LIST_FOREACH(ed->subobjs, l, o)
|
||||||
edje_object_calc_force(o);
|
{
|
||||||
for(i = 0; i < ed->table_parts_size; ++i)
|
const char *s = evas_object_type_get(o);
|
||||||
|
if ((s) && (!strcmp(s, "edje"))) edje_object_calc_force(o);
|
||||||
|
}
|
||||||
|
for (i = 0; i < ed->table_parts_size; i++)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *ep;
|
Edje_Real_Part *ep;
|
||||||
ep = ed->table_parts[i];
|
ep = ed->table_parts[i];
|
||||||
if ((ep->part->type == EDJE_PART_TYPE_BOX)
|
if ((ep->part->type == EDJE_PART_TYPE_BOX) ||
|
||||||
|| (ep->part->type == EDJE_PART_TYPE_TABLE))
|
(ep->part->type == EDJE_PART_TYPE_TABLE))
|
||||||
{
|
{
|
||||||
EINA_LIST_FOREACH(ep->typedata.container->items, l, o)
|
EINA_LIST_FOREACH(ep->typedata.container->items, l, o)
|
||||||
edje_object_scale_set(o, scale);
|
edje_object_scale_set(o, scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
edje_object_calc_force(obj);
|
edje_object_calc_force(obj);
|
||||||
|
|
Loading…
Reference in New Issue