Skip to main content

distribute_widths

Function distribute_widths 

Source
pub fn distribute_widths(
    columns: &[TableColumn],
    total_w: f64,
    overrides: &[Option<f64>],
) -> Vec<f64>
Expand description

Distribute total_w across columns according to their sizing modes.

overrides[i] = Some(w) pins column i to the user-resized width and removes it from the auto/remainder distribution. Remainder columns share whatever space is left after fixed + overridden columns, never going below their at_least.