Add a splash screen prior full start up in native mode #2442
brnjak-dominik
started this conversation in
Ideas / Feature Requests
Replies: 3 comments 4 replies
-
Would something like #2429 (comment) work for you? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I notice that the pywebview has provide a splash screen method |
Beta Was this translation helpful? Give feedback.
4 replies
-
Would something like this be helpful? I use this when I want to block the UI during long-running operations: @ui.page('/')
async def index():
async def slow():
overlay.set_visibility(True)
await asyncio.sleep(5)
overlay.set_visibility(False)
ui.label('something obscured in the background')
# Decorate this element as needed:
with ui.element('div').style(('position: fixed; display: block; width: 100%; height: 100%;'
'top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5);'
'z-index: 2; cursor: pointer;')) as overlay:
with ui.element('div').classes("h-screen flex items-center justify-center"):
ui.label('Please be patient!').style(
"font-size: 50px; color: white;")
app.on_connect(slow)
ui.run() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys,
first of all huge thanks to the NiceGUI Team - never enjoyed building applications this much! You guys nailed it with FastAPI and features like cpu/io bound stuff ... makes my life so much easier!
I am more on the backend side of things - but as i am building a application for different API-Requests I searched for a possibility to add an GIF/JPG/PNG as a splash screen while the application is loading.
Research led me right to the pyinstaller feature "pyi_splash" - but as of now the picture stays in the front untli the application is closed.
Have no control over the loading screen - plus it is not possible to show a GIF for example.
It would be more convenient to have control within the application, like PyQt5.
So in ui.run() - would it be possible to do something like this:
Thanks again for all of your work!
Beta Was this translation helpful? Give feedback.
All reactions