summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/edje/edje_calc.c9
-rw-r--r--src/lib/edje/edje_data.c2
2 files changed, 10 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))
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index ca9cbf11ad..daa4a01ac7 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -399,6 +399,8 @@ _edje_edd_init(void)
399 eet_data_descriptor_file_new(&eddc); 399 eet_data_descriptor_file_new(&eddc);
400 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "name", name, EET_T_STRING); 400 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "name", name, EET_T_STRING);
401 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "id", id, EET_T_INT); 401 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "id", id, EET_T_INT);
402 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "w", size.w, EET_T_INT);
403 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "h", size.h, EET_T_INT);
402 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "min.w", size.min.w, EET_T_INT); 404 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "min.w", size.min.w, EET_T_INT);
403 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "min.h", size.min.h, EET_T_INT); 405 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "min.h", size.min.h, EET_T_INT);
404 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "max.w", size.max.w, EET_T_INT); 406 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "max.w", size.max.w, EET_T_INT);