From c4124f8b3658a4f7dd8621d6b0bd86d758d445d8 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 21 Aug 2018 10:38:54 -0400 Subject: [PATCH] efl_ui_image: apply some image options as retained way. Summary: load_size will be applied when file is set, orientation, flip would be applied when starting sizing calc. These will gurantee applying options whether image is preset or not. This is a regression bug by ae51c81a686ca47c93eedc99beaf3a84f8a9cb96 Reviewers: #committers, zmike Reviewed By: #committers, zmike Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6855 --- src/lib/elementary/efl_ui_image.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 93664a254e..d440d1459a 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -85,7 +85,6 @@ _recover_status(Eo *obj, Efl_Ui_Image_Data *sd) efl_gfx_color_get(obj, &r, &g, &b, &a); efl_gfx_color_set(sd->img, r, g, b, a); - efl_gfx_entity_visible_set(sd->img, sd->show); } @@ -798,6 +797,13 @@ _sizing_eval_cb(void *data) evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_max_set(obj, maxw, maxh); + //Retained way. Nothing does, if either way hasn't been changed. + if (!sd->edje) + { + efl_orientation_set(sd->img, sd->orient); + efl_orientation_flip_set(sd->img, sd->flip); + } + if (sd->img) { _image_sizing_eval(sd, sd->img); @@ -1306,9 +1312,6 @@ _efl_ui_image_efl_orientation_orientation_set(Eo *obj, Efl_Ui_Image_Data *sd, Ef if (sd->edje) return; if (sd->orient == orient) return; - if (!sd->img) return; - efl_orientation_set(sd->img, orient); - sd->orient = orient; _efl_ui_image_sizing_eval(obj); } @@ -1326,9 +1329,6 @@ _efl_ui_image_efl_orientation_flip_set(Eo *obj, Efl_Ui_Image_Data *sd, Efl_Flip if (sd->edje) return; if (sd->flip == flip) return; - if (!sd->img) return; - efl_orientation_flip_set(sd->img, flip); - sd->flip = flip; _efl_ui_image_sizing_eval(obj); }