-
Couldn't load subscription status.
- Fork 236
Description
Hi,
I'm experiencing an issue with Flet Desktop on Windows 10. No matter what values I set for page.window_width and page.window_height at the beginning of my main() function, the app window always opens at the default size (usually 800x600). I would like my app to open at the dimensions I specify, but there seems to be no way to set the initial window size before the app window is displayed.
Steps to Reproduce:
Create a simple Flet Desktop app with the following code:
Python
import flet as ft
def main(page: ft.Page):
page.window_width = 1200
page.window_height = 700
page.add(ft.Text("Test"))ft.app(target=main)
Run the app with flet run main.py on Windows 10.
Observe that the window always opens at the default size, regardless of the values set in the code.
Expected Behavior:
The window should open at the specified size (1200x700).
Actual Behavior:
The window always opens at the default size, and the values set for page.window_width and page.window_height have no effect on the initial window size.
Additional Notes:
Changing the size via sliders or after the app is loaded works as expected.
The issue is only with setting the initial window size before the app is displayed.
This happens even with minimal app code.
Is there a way to set the initial window size before the app window is shown? If not, can this feature be supported in a future release?
Thank you!