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

Toggling window.frameless property more than once fails #4750

Open
ndonkoHenri opened this issue Jan 21, 2025 · 0 comments
Open

Toggling window.frameless property more than once fails #4750

ndonkoHenri opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ndonkoHenri
Copy link
Contributor

Discussed in #4743

Originally posted by SKD8 January 20, 2025

Question

When I tried to toggle the window frame, it went frameless on the first tap, but the frame did not restore back on the second tap. Why?

Code sample

import flet as ft

async def main(page: ft.Page):
    page.window.title_bar_hidden = True
    page.window.title_bar_buttons_hidden = True
    page.window.frameless = True
    page.window.height = 100
    page.window.width = 151

    def dock_click(e):
        page.window.frameless = not page.window.frameless
        page.update()

    dock = ft.WindowDragArea(
        content=ft.Container(
            width=100,
            height=100,
            bgcolor=ft.colors.WHITE70,
            border = ft.border.all(2, ft.colors.WHITE),
            border_radius=5,
            on_click=dock_click,
        ),
        maximizable=False,
    )

    page.add(dock)


ft.app(target=main)
@ndonkoHenri ndonkoHenri added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant