flet icon indicating copy to clipboard operation
flet copied to clipboard

page.window.frameless = True After that, the window does not have rounded corners

Open yst-one opened this issue 1 year ago • 2 comments

Duplicate Check

  • [X] I have searched the opened issues and there are no duplicates

Describe the bug

image

Code sample

import flet as ft

def main(page: ft.Page): page.window.frameless = True page.window.width = 320 page.window.height = 480 page.theme_mode= ft.ThemeMode.SYSTEM

page.padding= 0
page.add(
    ft.WindowDragArea(content= ft.Container(border_radius=20),expand=True),
    ft.IconButton(ft.icons.CLOSE, on_click=lambda _: page.window.close())
)
page.update()

ft.app(target=main, assets_dir="assets")

To reproduce

aa

Expected behavior

No response

Screenshots / Videos

No response

Operating System

Windows

Operating system details

win11

Flet version

0.24.1

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

No response

Logs

No response

Additional details

No response

yst-one avatar Oct 10 '24 10:10 yst-one

Can you share with which version of flet this used to work and share a screenshot of the resulting window?

OwenMcDonnell avatar Oct 17 '24 21:10 OwenMcDonnell

Hello! May I chime in? I opened an issue some time ago and it was closed, but the issue wasn’t fixed. It was 9 months ago. I didn’t reply because I missed the response somehow and forgot about it, terribly sorry. Issue number was #1110. I think we’re dealing with the same (or at least related) thing here.

Here is the code to reproduce

import flet as ft


def main(page: ft.Page):
    page.window.width = 450
    page.window.height = 450
    page.window.bgcolor = ft.colors.TRANSPARENT
    page.bgcolor = ft.colors.TRANSPARENT
    page.window.frameless = True
    page.window.center()
    
    def open_dialog(e):
        page.dialog = ft.AlertDialog(
            modal=True,
            title=ft.Text('Alert Dialog'),
            content=ft.Text('This is an alert dialog'),
            actions=[
                ft.TextButton('OK', on_click=close_dialog),
                ],
            )
        page.dialog.open = True
        page.update()
    
    def close_dialog(e):
        page.dialog.open = False
        page.update()
    
    def close_app(e):
        page.window.close()
    
    page.add(
        ft.Container(
            content=ft.Column(
                controls=[
                    ft.ElevatedButton('Open dialog', on_click=open_dialog),
                    ft.ElevatedButton('Close app', on_click=close_app),
                    ],
                alignment=ft.MainAxisAlignment.CENTER,
                spacing=10,
                ),
            bgcolor=ft.colors.SURFACE_CONTAINER_HIGHEST,
            border_radius=30,
            alignment=ft.alignment.center,
            expand=True,
            ),
        )


ft.app(target=main)

How it looks on my end. Using python 3.12.6 and flet 0.24.1.

frameless_alert_dialog

JasonSettings avatar Oct 24 '24 06:10 JasonSettings