Page MenuHomePhabricator

evas image: reload after alpha_set

Authored by kimcinoo on May 20 2020, 9:57 PM.



The alpha_set cancels preload, and do not try to load it again.
So the image is not showing, if the alpha_set is called while preloading.


Evas_Object *image = elm_image_add(box);
elm_box_pack_end(box, image);

elm_image_file_set(image, "img.png", NULL);     // start preloading

Evas_Object *eimg = elm_image_object_get(image);
evas_object_image_alpha_set(eimg, EINA_TRUE);   // cancel preloading

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
kimcinoo created this revision.May 20 2020, 9:57 PM
kimcinoo requested review of this revision.May 20 2020, 9:57 PM
zmike added a subscriber: zmike.May 21 2020, 7:07 AM

This should probably have a unit test which verifies the load callback is called on the elm_image at some point

kimcinoo updated this revision to Diff 30372.May 24 2020, 7:04 PM

Remove line which could cause regression.
Do not request preload (image_data_preload_request) as @Hermet requested.

Hermet accepted this revision.May 24 2020, 10:47 PM

Looks fine.

This revision is now accepted and ready to land.May 24 2020, 10:47 PM
This revision was automatically updated to reflect the committed changes.