diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-08-18 21:35:55 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-10-01 11:49:57 +0900 |
commit | 8e793381be922d6338427c5776b4dc65783a80b2 (patch) | |
tree | 219b546de3fe658ed2dde27c23531430a5a803a2 | |
parent | 844ef11cf1706e38603af52cd6c8fbdc6dd8cf07 (diff) | |
download | efl-8e793381be922d6338427c5776b4dc65783a80b2.tar.gz |
Edje: Fix IMAGE filters
Some invalid logic made filters work only in a rare situation.
@fix
-rw-r--r-- | src/lib/edje/edje_calc.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 3312007b2a..2da8cb8e31 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -2834,29 +2834,30 @@ _edje_part_recalc_single(Edje *ed, if (lminh > minh) minh = lminh; } } - else if ((ep->part->type == EDJE_PART_TYPE_IMAGE) && - (chosen_desc->min.limit || chosen_desc->max.limit)) + else if (ep->part->type == EDJE_PART_TYPE_IMAGE) { - Evas_Coord w, h; + if (chosen_desc->min.limit || chosen_desc->max.limit) + { + Evas_Coord w, h; - /* We only need pos to find the right image that would be displayed */ - /* Yes, if someone set aspect preference to SOURCE and also max,min + /* We only need pos to find the right image that would be displayed */ + /* Yes, if someone set aspect preference to SOURCE and also max,min to SOURCE, it will be under efficient, but who cares at the moment. */ - _edje_real_part_image_set(ed, ep, NULL, pos); - evas_object_image_size_get(ep->object, &w, &h); + _edje_real_part_image_set(ed, ep, NULL, pos); + evas_object_image_size_get(ep->object, &w, &h); - if (chosen_desc->min.limit) - { - if (w > minw) minw = w; - if (h > minh) minh = h; - } - if (chosen_desc->max.limit) - { - if ((maxw <= 0) || (w < maxw)) maxw = w; - if ((maxh <= 0) || (h < maxh)) maxh = h; + if (chosen_desc->min.limit) + { + if (w > minw) minw = w; + if (h > minh) minh = h; + } + if (chosen_desc->max.limit) + { + if ((maxw <= 0) || (w < maxw)) maxw = w; + if ((maxh <= 0) || (h < maxh)) maxh = h; + } } - _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos); } else if (ep->part->type == EDJE_PART_TYPE_PROXY) |