How to align background image on widget

What do you want to achieve?

align background image of a widget with top_center

in lvgl there is lv_obj_set_style_bg_img_align() function

in Squareline there is only tiled setting, but no equivalent setting

How to do this in squareline?

hello @Caipifrosch,

Currently, it is not possible to align a background image of a widget.
As a workaround, you can add an image widget to the widget you want to use and align it there.

Thanks Victor, as workaround I increased background picture size and moved visible part to desired position.

1 Like