summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_calc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_calc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 336bbc00cc..07f25ec02d 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -552,7 +552,7 @@ _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps,
552 Edje_Image_Directory_Set_Entry *entry; 552 Edje_Image_Directory_Set_Entry *entry;
553 Edje_Image_Directory_Set *set = NULL; 553 Edje_Image_Directory_Set *set = NULL;
554 Eina_List *l; 554 Eina_List *l;
555 int w = 0, h = 0, id; 555 int w = 0, h = 0, id, maxw = 0, maxh = 0;
556 556
557 if (!st && !imid) return -1; 557 if (!st && !imid) return -1;
558 if (st && !st->image.set) return st->image.id; 558 if (st && !st->image.set) return st->image.id;
@@ -581,8 +581,15 @@ _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps,
581 581
582 if (!set) set = ed->file->image_dir->sets + id; 582 if (!set) set = ed->file->image_dir->sets + id;
583 583
584 if (set->entries)
585 evas_image_max_size_get(evas_object_evas_get(obj), &maxw, &maxh);
584 EINA_LIST_FOREACH(set->entries, l, entry) 586 EINA_LIST_FOREACH(set->entries, l, entry)
585 { 587 {
588 // skip images that exceed max size
589 if ((maxw > 0) && (maxh > 0) &&
590 (entry->size.w > 0) && (entry->size.h > 0) &&
591 ((w > entry->size.w) || (h > entry->size.h)))
592 continue;
586 if ((entry->size.min.w <= w) && (w <= entry->size.max.w)) 593 if ((entry->size.min.w <= w) && (w <= entry->size.max.w))
587 { 594 {
588 if ((entry->size.min.h <= h) && (h <= entry->size.max.h)) 595 if ((entry->size.min.h <= h) && (h <= entry->size.max.h))