Issue in setting opacity to image


Facing issue in setting Opacity to an image object in the project generated by squareline studio.
With the opacity value less than 255, the object hides instead of being transparent.
The same code works in a squareline simulator.
We are using 16-bit swap color depth.

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


What LVGL version are you using?


What do you want to achieve?

Set the opacity to an image object to be displayed as pressed.

What have you tried so far?

We have tried to set different opacity values and found the object gets hidden for a value less than 255.

Code to reproduce

Add a code snippet that can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

lv_obj_set_style_opa(target, val, 0);

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.