Page MenuHomePhabricator

Setting ELM_BG_OPTION_TILE for an elm_bg has no effect when edje themes are loaded
Closed, ResolvedPublic


Since commit 09d3d5b85ad4a0b7441b5b1e508db0e595bef395 when setting an edje theme for a widget like this

elm_theme_extension_add(NULL, "./mulbmin.edj");
btn_mul = elm_button_add(win);
elm_object_style_set(btn_mul, "mulbutt");

and setting a background for the same window like this

bg = elm_bg_add(win);
elm_bg_file_set(bg, "pat.jpg", NULL);
elm_bg_option_set(bg, ELM_BG_OPTION_TILE);

the background image isn't tiled but centered. Setting the option to ELM_BG_OPTION_SCALE or ELM_BG_OPTION_STRETCH has no effect either.
2 test programs and edje files can be found here:

There is a simple elm-window application normal.c without themed widgets
and an application theme.c with themed widgets that shows the described behaviour.

Applying following patch to 4a2b411287fadf26ee92512d1438a1284fedf435 resolves the issue, but probably this is no proper fix.

diff --git a/src/lib/elementary/efl_ui_bg_widget.c b/src/lib/elementary/efl_ui_bg_widget.c
index 6551058dae..927a2fb041 100644
--- a/src/lib/elementary/efl_ui_bg_widget.c
+++ b/src/lib/elementary/efl_ui_bg_widget.c
@@ -278,8 +278,6 @@ _efl_ui_bg_widget_legacy_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
    obj = efl_constructor(efl_super(obj, EFL_UI_BG_WIDGET_LEGACY_CLASS));
    efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
-   elm_image_no_scale_set(pd->img, EINA_TRUE);
    return obj;
escwyp created this task.Jun 25 2018, 3:22 PM
bu5hm4n claimed this task.Jun 26 2018, 7:01 AM
bu5hm4n edited projects, added regression, efl: widgets; removed efl.
Herald triaged this task as Showstopper Issues priority. · View Herald TranscriptJun 26 2018, 7:01 AM

Thank you for detailed bug reports like this! They are awesome, and makes it sooo much easier to work on bugs! Big *thumbs up* for that :)

Your patch here looks completly correct to me here, so i am going to submit this for review with you as author.

Can you give me a mail address ?

Sure: hinem at
The patch itself is just a revert of 09d3d5b85ad4a0b7441b5b1e508db0e595bef395 and I guess this was introduced for reason. But anyway. Thanks for picking up tasks that quickly ;)

Okay wait, i rechecked, right now on master this seems to work.

The test code you have added seems to work on 80baf516a3267b5ae02a2c8d931ff153f3b1f64a

Can you recheck ?

Mh, for me it's still not working. When I run the program called 'theme' it looks like

Okay, i can reproduce it now, i used the wrong test code, my bad! Will check in next time! Busy with something else right now ... :/