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
constrained(Constraints::tight(Vec2::splat(100.0)), || {row(|| {text("Lorem ipsum dolor sit amet blah blah blah I just want some long text here");});});
In this snippet, the text bleeds outside of the constrained area because List throws away the main axis constraints when laying out non-flex objects.
A workaround is to wrap the objects that need to be constrained in expanded or flexible with a non-zero flex factor:
constrained(Constraints::tight(Vec2::splat(100.0)), || {row(|| {expanded(|| {text("Lorem ipsum dolor sit amet blah blah blah I just want some long text here");});// ORflexible(1.0, || {text("Lorem ipsum dolor sit amet blah blah blah I just want some long text here");});});});
The text was updated successfully, but these errors were encountered:
In this snippet, the text bleeds outside of the constrained area because
List
throws away the main axis constraints when laying out non-flex objects.A workaround is to wrap the objects that need to be constrained in
expanded
orflexible
with a non-zero flex factor:The text was updated successfully, but these errors were encountered: