Page MenuHomePhabricator

efl_ui_image: keep efl_ui_image size for internal image
ClosedPublic

Authored by kimcinoo on Mar 24 2020, 8:14 PM.

Details

Summary

The size of internal image could be bigger than the size of efl_ui_image
with following code.

image = elm_image_add
elm_image_fill_outside_set(image, EINA_TRUE);

If the internal image object is 300x300, and efl_ui_image is 360x77, then
the internal image object will resize to 360x360 which is bigger than the
size of efl_ui_image.

This is a compatibility issue. This patch will make efl_ui_image work as
before commit 8cb6c3e Elm_image: implement 'scale_type' and 'scalable'...

Test Plan

This is old example to reproduce the problem.

This is newly added example to check if this patch breaks compatibility or not.

You can use the example with following image.

This is result before applying this patch.

This is result after applying this patch.

The translucent rectangle is the size of the efl_ui_image.
As you might be noticed, only FIT_WIDTH (the 4th one of each row),
and EXPAND (the 6th one of each row) are different.

One more difference the 1st one of 2nd row; NONE.

F.Y.I. and for quick understanding of example.
The 1st row efl_ui_image is bigger than internal image.
The 2nd row efl_ui_image is smaller than internal image.
From the left the scale type is NONE, FILL, FIT, FIT_WIDTH,
FIT_HEIGHT, EXPAND, and TILE.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kimcinoo created this revision.Mar 24 2020, 8:14 PM
kimcinoo requested review of this revision.Mar 24 2020, 8:14 PM
kimcinoo edited the test plan for this revision. (Show Details)Mar 24 2020, 8:15 PM
kimcinoo edited the test plan for this revision. (Show Details)Mar 24 2020, 11:34 PM
kimcinoo edited the test plan for this revision. (Show Details)
kimcinoo edited the test plan for this revision. (Show Details)Mar 25 2020, 1:17 AM
Hermet accepted this revision.Mar 25 2020, 3:11 AM
This revision is now accepted and ready to land.Mar 25 2020, 3:11 AM
This revision was automatically updated to reflect the committed changes.