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
I think the biggest source of complexity here is correctly determining the "preferred size" in each widget, as the calculations in e.g. Button tend to get quite complex with support for right text, images, etc..
I propose we introduce a WidgetLayout struct that handles laying out arbitray things (text, images, custom shape) inside a widget. This would remove a lot of complexity from each Widgets code and also make it easier to implement custom 3rd party widgets.
Also widgets get more flexible, as it would be trivial to e.g. create a button with an image on the right.
The layout calculation should be pretty basic, only horizontal, only allow a single item to shrink / wrap, just enough to implement all the current widgets.
Calculation of the preferred_size could then be handled there transparently to each widget.
Uh oh!
There was an error while loading. Please reload this page.
…as a potential solution to #5138
what does desired_size mean?
in case of text: longest width of the child label, at most max_width
calculate label width from galley
Naming: Maybe desired_size?
The text was updated successfully, but these errors were encountered: