Open moonlitgrace opened 1 year ago
Please can you provide a screen capture/shot of what you mean?
I think this would be enough?
Can you try with the latest flet version? v0.9.0
Can you try with the latest flet version? v0.9.0
Hi, I just got the same behavior with the current version of flet (v.0.9.0). I noticed it only happens when I set page.window_resizable = False
.
Here's an easy demo I use to test it:
import flet as ft
def main(page: ft.Page):
page.window_width = 200 # window's width is 200 px
page.window_height = 200 # window's height is 200 px
page.window_resizable = False # window is not resizable
page.update()
# add/update controls on Page
t = ft.Text(value="Hello, world!", color="green", font_family="Museo Sans 300")
page.controls.append(t)
page.update()
ft.app(target=main)
if you comment the line page.window_resizable = False # window is not resizable
it starts working.
It works as expected on my end. I tried several times, and not even once did it have another size. Can you try the below and share the app's behavior?
import flet as ft
def main(page: ft.Page):
page.window_width = 200 # window's width is 200 px
page.window_height = 200 # window's height is 200 px
page.window_visible = True
page.window_resizable = False # window is not resizable
page.update()
# add/update controls on Page
t = ft.Text(value="Hello, world!", color="green", font_family="Museo Sans 300")
page.controls.append(t)
page.update()
ft.app(target=main, view=ft.FLET_APP_HIDDEN)
Hi, I just got the same behavior with the current version of flet (v.0.9.0). I noticed it only happens when I set page.window_resizable = False.
Yes, recently I updated to version v0.9.0 pip install flet --upgrade
, now this issue seems almost okay ( but still acting weird some times ).
and if I set page.window_resizable = False
then shows another window size... same here.
It works as expected on my end. I tried several times, and not even once did it have another size. Can you try the below and share the app's behavior?
Okay! try for 10 times? but still its not stable on my end. Also I did tried your test code, same since it has page.window_resizable = False
. If I remove or comment it... back to normal ( with issue some times ).
Okay, any updates?
Description I configured width and height for page window. And when I run code, it may show window with correct size and if I re run again then shows a window with different size ( probably my screen size ). And this happens all the time which feels off.
Code example to reproduce the issue:
Describe the results you received: Some times shows correct window size, some times not.
Describe the results you expected: Show page window with configured size
Additional information you deem important (e.g. issue happens only occasionally): Yes this issue happens only occasionally.
Flet version (
pip show flet
):Operating system: Linux
Additional environment details: ...