summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-01-21 15:15:43 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-01-21 15:17:00 -0500
commitc04d793dec1063a6dae1c3f403c56d8df1607303 (patch)
tree354ab9c421f4de5596b0d9a4c620e14298b3be79
parent96d8cec21e332bd260e2d5eb50e08d1ad69cc17e (diff)
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
-rw-r--r--src/lib/elm_image.c34
-rw-r--r--src/lib/elm_image.eo4
2 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 8e12a39a7..4ca45fa8f 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
841 edje_object_signal_emit(sd->img, emission, source); 841 edje_object_signal_emit(sd->img, emission, source);
842} 842}
843 843
844EOLIAN static void
845_elm_image_edje_object_size_min_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h)
846{
847 if (sd->edje)
848 edje_object_size_min_get(sd->img, w, h);
849 else
850 evas_object_size_hint_min_get(sd->img, w, h);
851}
852
853EOLIAN static void
854_elm_image_edje_object_size_max_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h)
855{
856 if (sd->edje)
857 edje_object_size_max_get(sd->img, w, h);
858 else
859 evas_object_size_hint_max_get(sd->img, w, h);
860}
861
862EOLIAN static void
863_elm_image_edje_object_calc_force(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
864{
865 if (sd->edje)
866 edje_object_calc_force(sd->img);
867}
868
869EOLIAN static void
870_elm_image_edje_object_size_min_calc(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h)
871{
872 if (sd->edje)
873 edje_object_size_min_calc(sd->img, w, h);
874 else
875 evas_object_size_hint_min_get(sd->img, w, h);
876}
877
844EOLIAN static Eina_Bool 878EOLIAN static Eina_Bool
845_elm_image_mmap_set(Eo *obj, Elm_Image_Data *sd, const Eina_File *f, const char *key) 879_elm_image_mmap_set(Eo *obj, Elm_Image_Data *sd, const Eina_File *f, const char *key)
846{ 880{
diff --git a/src/lib/elm_image.eo b/src/lib/elm_image.eo
index ef934d4de..d5592cb6b 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,
543 Efl.Image.smooth_scale.set; 543 Efl.Image.smooth_scale.set;
544 Efl.Image.smooth_scale.get; 544 Efl.Image.smooth_scale.get;
545 Edje.Object.signal_emit; 545 Edje.Object.signal_emit;
546 Edje.Object.size_min.get;
547 Edje.Object.size_max.get;
548 Edje.Object.size_min_calc;
549 Edje.Object.calc_force;
546 Evas.Object_Smart.hide; 550 Evas.Object_Smart.hide;
547 Evas.Object_Smart.clip.set; 551 Evas.Object_Smart.clip.set;
548 Evas.Object_Smart.clip_unset; 552 Evas.Object_Smart.clip_unset;