You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for ImageView says that a flex=1 image will be expanded or shrunk to fit the available space. It definitely expands images to fit, but a large image will not be shrunk to fit.
if image.png is smaller than the window, it will be expanded; if image.py is larger than the window, the window will be expanded to fit the natural size of the window (or, on mobile, show "content doesn't fit window" warnings).
Expected behavior
An ImageView with flex=1 should shrink large images to fit the available space, preserving aspect ratio.
Screenshots
No response
Environment
Operating System: all (tested on macOS and iOS)
Python version: All
Software versions:
Toga: 0.4.0
Logs
No response
Additional context
The underlying problem appears to be that the intrinsic constraint has been set to at_least(size) in each axis, rather than at_least(0). This enforces a minimum size that can't be shrunk.
The text was updated successfully, but these errors were encountered:
Describe the bug
The documentation for ImageView says that a
flex=1
image will be expanded or shrunk to fit the available space. It definitely expands images to fit, but a large image will not be shrunk to fit.Steps to reproduce
Use the following app code:
if image.png is smaller than the window, it will be expanded; if image.py is larger than the window, the window will be expanded to fit the natural size of the window (or, on mobile, show "content doesn't fit window" warnings).
Expected behavior
An ImageView with
flex=1
should shrink large images to fit the available space, preserving aspect ratio.Screenshots
No response
Environment
Logs
No response
Additional context
The underlying problem appears to be that the intrinsic constraint has been set to
at_least(size)
in each axis, rather thanat_least(0)
. This enforces a minimum size that can't be shrunk.The text was updated successfully, but these errors were encountered: