Change transparency/opacity based on position of other object

Description

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

x86

What LVGL version are you using?

8.3.3

What do you want to achieve?

I want to change an object’s transparency based on the position of another object. The other object can be dragged but is also animated.

What have you tried so far?

I tried to change the transparency when the other object receives a LV_EVENT_SIZE_CHANGED but that is not triggered on position changes.

Is there an event for “position changed”?

Thanks!

Got this kind of working with using references to the transparent object both in drag and animation callback: Demo