I have a Label
nested in a VisualElement
. The VisualElement
has a max width 200px
and the Label
is set to wrap its text.
If the text is short, the Label
correctly sizes to fit the text, but when the text is too long to fit, the Label
snaps to the max width, leaving white space on the right because the rest of the text is on the next line.
How can I make the Label
always fit the wrapping text, without growing wider than a given max width?
Pictured is what it looks like now. I need the box to fit the text snuggly in the second example: