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

Documentation and API cleanups on Image #2348

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

freakboy3742
Copy link
Member

Modifies the constructor for Image to better handle the backwards compatibility path, and provide a less confusing type annotation.

Also takes the opportunity to introduce canonical documentation on the difference between Image and Icon. I'm very slightly softening on the idea of adding an on_press handler to ImageView (to support the "Image Gallery" use case); in the meantime, these admonitions explain the status quo. If we add ImageView.on_press in the future, the admonitions will need to be updated to say that you can make ImageView interactive, but if what you're looking for is a fancy button, please don't.

Fixes #2347.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@mhsmith mhsmith merged commit 8c971a2 into beeware:main Jan 17, 2024
35 checks passed
@freakboy3742 freakboy3742 deleted the image-tweaks branch January 18, 2024 05:53
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.

toga.Image() doesn't accept None as a value for src
2 participants