questions about pack / flex #3922
Replies: 1 comment 2 replies
-
|
Flex can be applied to all widgets, not just boxes. The "box specific" description is misleading - it should probably say "widget" or maybe "element"). Your "direction" example is an interesting one. The general rule we try to follow is that there should be a direct mapping to HTML and CSS; based on that reading, a label should expand vertically. In this case I can explain the discrepancy - that the label widget has a fixed intrinsic height (as do most widgets), and that means the widget isn't expanding to the full "flex" height. The question then becomes whether this is a bug in the Label widget, a bug in Pack, or a bug/edge case in the HTML/CSS mapping. I think the issue with dividers is #1529; the history on that ticket shows there's something complex going there that has defied analysis to date. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
1/ Does flex apply only to boxes or to all widgets?
the manual says A weighting that is used to compare this box with its siblings when allocating remaining space in a box.
2/ In the example below, the label scales to full width in the first case but does not scale to full height in the second case, although the examples are symmetric. Why? (edit: With boxes this does work as I expected. Wouldn't it make sense for all widgets with a width and hight to behave in the same way?)
3/ In the example below, the vertical divider is shown in the first and second case but not in the third. Is there any way to make a vertical divider scale to the hight of the row (determined by the other widgets, in this case the labels)?
Beta Was this translation helpful? Give feedback.
All reactions