flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.14k stars 429 forks source link

Windows problem with maximized screen #2606

Open AleHS-99 opened 8 months ago

AleHS-99 commented 8 months ago

Im a windows user, i have a pregram build with flet on version 0.13 and it was working just fine, but when i update to the last version 0.19 the property page.window_maximized = True works sometimes, and sometimes it did not.

def main(page: ft.Page): page.window_maximized = True page.add(ft.Text("Try this"))

ft.app(main)

lekshmanmj commented 8 months ago

please try adding page.update()

taaaf11 commented 8 months ago

please try adding page.update()

I can confirm this

Flet version: 0.19.0

AleHS-99 commented 8 months ago

please try adding page.update()

dont work.....

taaaf11 commented 8 months ago

Please give the repro code

AleHS-99 commented 7 months ago

i dont have a public repo sorry, but only with this still working some times and sometimes it did not, its completly random: `def main(page: ft.Page):

page.window_maximized = True

page.update()

if name == "main": ft.app(main, assets_dir="assets")`

taaaf11 commented 7 months ago

For the window maximization, the provided code works.

By the way, you have also written:

if name == "main":
    ft.app(main, assets_dir="assets")

I wonder why your program even work with this code block?