Hi,
a very common pattern, when working with UIs, is the ability to signal the underlying library that some changes are going to be performed but that the library has to wait before considering to trigger a real refresh.
From the looks of it, the refresh relies on lv_obj_invalidate so I was thinking that having a bit flag in the obj struct to identify if the obj is being updated (using begin / end _update methods) checked by the lv_obj_invalidate would do more than half of the job.
Triggering the actual refresh may be a bit trickier, while the current architecture relies on the fact that the children is contained in the parent with the above mentioned approach the parent would have to trigger the refresh for the children objs but I am fairly sure there are various approaches for this.
I am currently building an interface with many items built at runtime while the screen is visible and I don’t want to set it to hidden and then back to visible to refresh it because makes to code tricky.
I am willing to look into it but before getting down to a road that can be really tricky, do you foresee any breaking with this approach?
Forgot to mention, I am using lvgl with micropython v1.11. I don’t think this is going to have any impact on the above mentioned approach but just in case better to highlight it .
Thanks!