Is there a way to update widget size recursively after screen resolution update?

Description

What MCU/Processor/Board and compiler are you using?

any

What LVGL version are you using?

7.0

What do you want to achieve?

I need to recalculate position and size of widgets after screen rotation or resolution update.

What have you tried so far?

N/A

Code to reproduce

N/A

Screenshot and/or video

N/A

You can either use layouts or structure your code in such a way that you can call a function to recalculate the sizes of the objects. Aside from layouts there’s no built-in solution for handling this, as needing to resize the screen is not a common requirement.

Looks like I’ve found a solution. I can create a page/cont/win based layout and then recalculate relative position on LV_SIGNAL_STYLE_CHG. Of cource after changing resolution I need to call lv_obj_refresh_style function.