Skip to main content

AutofitPolicy

Trait AutofitPolicy 

Source
pub trait AutofitPolicy: 'static {
    // Required method
    fn content_width(&self, context: &mut AutofitContext<'_>) -> Pixels;
}
Expand description

Chooses the text width a column needs when it is autofitted (a double click on its resize handle, autofit_column, autofit_columns). The grid adds the cell padding and clamps to the column’s limits.

Called once per column when the fit is applied, never per frame.

Required Methods§

Source

fn content_width(&self, context: &mut AutofitContext<'_>) -> Pixels

The text width the column needs.

Implementors§