Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window doesn't follow window max and min width and height when titlebar is hidden #3233

Open
nexusvoyager opened this issue May 7, 2024 · 0 comments

Comments

@nexusvoyager
Copy link

Description

I have an issue where whenever I set window_title_bar_hidden to True the window would straight up not adhere to my set values for my minimum and maximum window width and height

Code example to reproduce the issue:

import flet as ft

def main(page: ft.Page):
    #Code Contains Min and Max Values
    page.window_max_width = 600
    page.window_max_height = 800

    page.window_min_width = 500
    page.window_min_height = 500

    #values are respected when titlebar is visible but when not they are ignored 
    page.window_title_bar_hidden = False
    page.window_title_bar_buttons_hidden = False


    titlebar = ft.Row(
        [
            ft.WindowDragArea(content=ft.Container(ft.Text("Drag area"), padding=10), expand=True),
            ft.IconButton(ft.icons.CLOSE, on_click=lambda _: page.window_close(),)
        ]
    )
    page.add(
        titlebar,
        ft.Text("Window")

        

    )

    page.update()
ft.app(target=main)

Describe the results you received:

Window straight up didn't follow the set values I had when I made the titlebar hidden and allowed me to just resize it however I wanted (which is undesirable in my case)

Video demonstration below

2024-05-07.12-39-41.mp4

Describe the results you expected:

The same result I've received

Flet version (pip show flet):

Name: flet
Version: 0.22.0
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page: 
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: /home/nexus/.local/lib/python3.12/site-packages
Requires: cookiecutter, fastapi, flet-runtime, packaging, qrcode, uvicorn, watchdog
Required-by: 

Give your requirements.txt file (don't pip freeze, instead give direct packages):

its basically just flet as its pretty basic

flet

Operating system:

Linux, Fedora 40, Kernel 6.8.8-300.fc40.x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant