-
Notifications
You must be signed in to change notification settings - Fork 594
Description
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
On Windows the window height includes the applications title bar whilst on Linux it dose not.
For example setting a window to be 32 pixels tall on Linux gives a window that is 32 pixels tall + the height of the title bar. On windows setting a window to be 32 pixels tall only renders the title bar since 32 pixels is less than the height of the title bar. (The title bar appears to be 38 pixels tall on Windows 11.)
Setting the height of a window is therefore inconsistent and produces different results on different platforms.
I am unaware of how the height behaves on macOS.
Code sample
Code
page.window.height = 50To reproduce
- Set the window height (preferably to something small like 50px since it is easier to see the issue with a short height).
- Run the application on Windows and Linux.
- Observe the difference in window height on the two platforms.
Expected behavior
The height of the title bar is excluded from the window height on Windows like it is on Linux.
Screenshots / Videos
No response
Operating System
Windows
Operating system details
Windows 11 (Also tested on Ubuntu 24.04.3 LTS)
Flet version
0.28.3
Regression
I'm not sure / I don't know
Suggestions
For anyone else facing this problem you can use the function below when changing window height to compensate:
def UpdateWindowHeight(page: ft.Page, height: int) -> None:
if page.platform == ft.PagePlatform.WINDOWS:
height += 38
page.window.height = heightLogs
No response
Additional details
No response