Skip to main content

Module layout

Module layout 

Source
Expand description

Column-width resolution + per-pane horizontal layout.

ColumnSolver resolves a list of ColumnWidth declarations against the available pane width, in three passes:

  1. Fixed(px) is clamped by min_width / max_width.
  2. Auto evaluates to a fallback width (the table’s min_column_width_default; a future pass will probe the header label and visible cells).
  3. Remaining horizontal space is distributed among Flex columns proportional to their flex factor, iteratively: a column whose proportional share would violate its own min_width/max_width is 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’s LayoutResponse shrink algorithm) so floor violations on one column don’t starve or overrun its siblings.

The output is a parallel Vec<f32> of resolved widths matching the input column order.