discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=c04d793dec1063a6dae1c3f403c56d8df1607303
commit c04d793dec1063a6dae1c3f403c56d8df1607303 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Wed Jan 21 15:15:43 2015 -0500 image now implements edje object size functions Edje.Object.size_min.get; Edje.Object.size_max.get; Edje.Object.size_min_calc; Edje.Object.calc_force; fixes all image-in-edje sizing issues/errors --- src/lib/elm_image.c | 34 ++++++++++++++++++++++++++++++++++ src/lib/elm_image.eo | 4 ++++ 2 files changed, 38 insertions(+) diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index 8e12a39..4ca45fa 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c @@ -841,6 +841,40 @@ _elm_image_edje_object_signal_emit(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, cons edje_object_signal_emit(sd->img, emission, source); } +EOLIAN static void +_elm_image_edje_object_size_min_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h) +{ + if (sd->edje) + edje_object_size_min_get(sd->img, w, h); + else + evas_object_size_hint_min_get(sd->img, w, h); +} + +EOLIAN static void +_elm_image_edje_object_size_max_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h) +{ + if (sd->edje) + edje_object_size_max_get(sd->img, w, h); + else + evas_object_size_hint_max_get(sd->img, w, h); +} + +EOLIAN static void +_elm_image_edje_object_calc_force(Eo *obj EINA_UNUSED, Elm_Image_Data *sd) +{ + if (sd->edje) + edje_object_calc_force(sd->img); +} + +EOLIAN static void +_elm_image_edje_object_size_min_calc(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h) +{ + if (sd->edje) + edje_object_size_min_calc(sd->img, w, h); + else + evas_object_size_hint_min_get(sd->img, w, h); +} + EOLIAN static Eina_Bool _elm_image_mmap_set(Eo *obj, Elm_Image_Data *sd, const Eina_File *f, const char *key) { diff --git a/src/lib/elm_image.eo b/src/lib/elm_image.eo index ef934d4..d5592cb 100644 --- a/src/lib/elm_image.eo +++ b/src/lib/elm_image.eo @@ -543,6 +543,10 @@ class Elm_Image (Elm_Widget, Efl.File, Efl.Image, Evas.Clickable_Interface, Efl.Image.smooth_scale.set; Efl.Image.smooth_scale.get; Edje.Object.signal_emit; + Edje.Object.size_min.get; + Edje.Object.size_max.get; + Edje.Object.size_min_calc; + Edje.Object.calc_force; Evas.Object_Smart.hide; Evas.Object_Smart.clip.set; Evas.Object_Smart.clip_unset; --