forked from enlightenment/efl
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
This commit is contained in:
parent
69fae8c7bf
commit
c4124f8b36
|
@ -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_get(obj, &r, &g, &b, &a);
|
||||||
efl_gfx_color_set(sd->img, r, g, b, a);
|
efl_gfx_color_set(sd->img, r, g, b, a);
|
||||||
|
|
||||||
efl_gfx_entity_visible_set(sd->img, sd->show);
|
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_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
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)
|
if (sd->img)
|
||||||
{
|
{
|
||||||
_image_sizing_eval(sd, 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->edje) return;
|
||||||
if (sd->orient == orient) return;
|
if (sd->orient == orient) return;
|
||||||
|
|
||||||
if (!sd->img) return;
|
|
||||||
efl_orientation_set(sd->img, orient);
|
|
||||||
|
|
||||||
sd->orient = orient;
|
sd->orient = orient;
|
||||||
_efl_ui_image_sizing_eval(obj);
|
_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->edje) return;
|
||||||
if (sd->flip == flip) return;
|
if (sd->flip == flip) return;
|
||||||
|
|
||||||
if (!sd->img) return;
|
|
||||||
efl_orientation_flip_set(sd->img, flip);
|
|
||||||
|
|
||||||
sd->flip = flip;
|
sd->flip = flip;
|
||||||
_efl_ui_image_sizing_eval(obj);
|
_efl_ui_image_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue