gNeandr wrote:
> The secret seems to be to add flex also to the label.
The preferred width of a label equals that of its text. Setting a crop
only changes a label's minimum width; it would still prefer to display
all of its text. And an hbox will simply propagate the preferred width
up through the layout. Only making the label flexible will allow it to
shrink.
Note that in the case of a label being the only content on the line, you
can get a better effect by wrapping it in a <vbox align="start">
instead. The align="start" has a similar effect on the propagation of
the width without the inconvenience of making the label flexible, which
would allow it to take up more space than it needs to (e.g. if you want
to draw an outline around the text).
--
Warning: May contain traces of nuts.