Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

Update no-frame-window.py to resolve deprecation warnings#172

Open
non-npc wants to merge 1 commit into
flet-dev:mainfrom
non-npc:patch-19
Open

Update no-frame-window.py to resolve deprecation warnings#172
non-npc wants to merge 1 commit into
flet-dev:mainfrom
non-npc:patch-19

Conversation

@non-npc

@non-npc non-npc commented Sep 12, 2024

Copy link
Copy Markdown
Contributor

resolved the following deprecation warnings:
window_title_bar_hidden()
window_title_bar_buttons_hidden()
window_close()

resolved the following deprecation warnings:
window_title_bar_hidden()
window_title_bar_buttons_hidden()
window_close()
expand=True,
),
IconButton(icons.CLOSE, on_click=lambda _: page.window_close()),
# Use the updated method to close the window

Copy link
Copy Markdown
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 😅

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

here too

),
IconButton(icons.CLOSE, on_click=lambda _: page.window_close()),
# Use the updated method to close the window
IconButton(icons.CLOSE, on_click=lambda _: page.window.close()),

Copy link
Copy Markdown
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.

@non-npc

non-npc commented Sep 12, 2024

Copy link
Copy Markdown
Contributor Author

sorry about comments, its habit. I will try to remember 👍

@ndonkoHenri

Copy link
Copy Markdown
Contributor

No worries.
Can you make a commit to remove them?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants