From c043a15ccf30cb2dbeb5624686a0a2d81c4aa67b Mon Sep 17 00:00:00 2001 From: non-npc <101848445+non-npc@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:41:56 -0400 Subject: [PATCH] Update no-frame-window.py resolved the following deprecation warnings: window_title_bar_hidden() window_title_bar_buttons_hidden() window_close() imported flet as ft --- python/controls/window-drag-area/no-frame-window.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/python/controls/window-drag-area/no-frame-window.py b/python/controls/window-drag-area/no-frame-window.py index c2b34323..1c967477 100644 --- a/python/controls/window-drag-area/no-frame-window.py +++ b/python/controls/window-drag-area/no-frame-window.py @@ -1,10 +1,9 @@ -import flet +import flet as ft 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 + page.window.title_bar_hidden = True + page.window.title_bar_buttons_hidden = True page.add( Row( @@ -19,10 +18,9 @@ def main(page: Page): ), expand=True, ), - IconButton(icons.CLOSE, on_click=lambda _: page.window_close()), + IconButton(icons.CLOSE, on_click=lambda e: page.window.close()), ] ) ) - -flet.app(target=main) +ft.app(target=main)