Expand description
Column-width resolution + per-pane horizontal layout.
ColumnSolver resolves a list of ColumnWidth declarations against
the available pane width, in four passes:
Fixed(px)is clamped bymin_width/max_width.Autoevaluates to a fallback width (the table’smin_column_width_default; a future pass will probe the header label and visible cells).- Remaining horizontal space is distributed among
Flexcolumns proportional to their flex factor, iteratively: a column whose proportional share would violate its ownmin_width/max_widthis pinned to that bound and drops out of the pool, and the leftover + flex-factor total it would have consumed is re-shared among the columns still in play. Repeats to a fixed point (the same clamp-and-redistribute shape as the framework’sLayoutResponseshrink algorithm) so floor violations on one column don’t starve or overrun its siblings. - With
stretch_last, whatever width the three passes left unclaimed goes to the last column in display order (Qt’sstretchLastSection). Only the gap — aFlexcolumn already takes every spare pixel, so this is a no-op for it and matters for pixel-sized tables; and the last column’s own override is ignored while it stretches, since the stretch would undo it anyway.
The output is a parallel Vec<f32> of resolved widths matching the
input column order.