Screen with reduced alpha appears white instead transparent

Hello,

I want to display a screen on another screen with a reduced alpha for background in order to see on the new screen only the center panel, like a modal window.

When I tried to do this the screen appear white insted of seeing the other screen.

Is there a way to do this ?

Hi,

You need to enable LV_COLOR_SCREEN_TRANSP in lv_conf.h.

Hello,

It has changed the background color, now it appears black, but I do not see the previous screen in the background ?

I use this function to change the screen.

C._ui_screen_change(C.ui_UserConfirmationScreen, C.LV_SCR_LOAD_ANIM_FADE_ON, 0, 0)

I think that the bakground is reloaded when the screen is changed

Normally the screens should fully convert the display. Have you changed e.g. the bg_opa of a screen to make the prevoius screen visible?

YES BG color FFFFFF Alpha 0

You cant have two screens on display , you need two panels

¨Peach. It isn’t easy to make a pop-up screen. I will have ten screen with this pop-up.

Have I to do all in one screen with multiple panel ???

Simply create dummy screen and on it one modal panel . In code then call set parent and move this panel over actual screen and back to dummy on hide.

Simply. But not so easy when I have to manage the touch action of each panel in each screen.

I do not understand why lvgl redraw the background when the background alpha is set to 0. ???

I mean panel is only one and event is handled on panel objects…

If it is possible to add code for component and it is automatically reproduce for each child, it will be nice.

But i don’t know how to add code to component and not to child. Sorry. I’m neebie.

works perfectly

C.lv_obj_set_parent(C.ui_UserInfoModal, C.ui_HomeScreen)

Thanks for the trick.