Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions python/controls/window-drag-area/no-frame-window.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import flet
from flet import Container, IconButton, Page, Row, Text, WindowDragArea, colors, icons


def main(page: Page):
page.window_title_bar_hidden = True
page.window_title_bar_buttons_hidden = True
# Use the updated properties for window title bar settings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

page.window.title_bar_hidden = True
page.window.title_bar_buttons_hidden = True

page.add(
Row(
Expand All @@ -19,10 +19,11 @@ def main(page: Page):
),
expand=True,
),
IconButton(icons.CLOSE, on_click=lambda _: page.window_close()),
# Use the updated method to close the window
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You dont need to add comments saying this 😅

IconButton(icons.CLOSE, on_click=lambda _: page.window.close()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IconButton(icons.CLOSE, on_click=lambda _: page.window.close()),
IconButton(icons.CLOSE, on_click=lambda e: page.window.close()),

Let's have e there just for good practice.

]
)
)


flet.app(target=main)