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

Callback functions for window resizing #4588

Closed
2 tasks done
eschricker opened this issue Jan 31, 2024 · 1 comment
Closed
2 tasks done

Callback functions for window resizing #4588

eschricker opened this issue Jan 31, 2024 · 1 comment

Comments

@eschricker
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

I want to persist resizing changes made by users. If the user opens the application and resizes the window this settings should be saved. The next time the app will be opened, the window should have the same dimensions.

There are related issues like #2563 or #554 but they want the persisting capabilities within the framework.

Is it possible to construct a solution with the existing API?

It's currently not possible. You can't register a callback which is called if the window is resized.

Describe the solution you'd like to see.

Add a new function callback OnResized(size fyne.Size) to the interface Window which is triggered if Resize() is called.

With this I am able to catch window resizing and save them via the preferences api.

@eschricker
Copy link
Author

I have found the solution mentioned in #224

This works fine for my use case!

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

No branches or pull requests

1 participant