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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

non-npc
Copy link
Contributor

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

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()
@@ -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 😅

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

@@ -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
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.

@non-npc
Copy link
Contributor Author

non-npc commented Sep 12, 2024

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

@ndonkoHenri
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants