Skip to main content

Module swatch_grid

Module swatch_grid 

Source
Expand description

SwatchGrid — Role::Grid container of color swatches with arrow-key roving focus, mirroring the Calendar widget’s grid pattern.

Lays out its children in fixed-column rows using the existing Grid primitive. Click / Enter / Space on any cell calls on_select(color, ctx). Tab moves focus into the first cell; arrow keys move within the grid (Left/Right by 1, Up/Down by columns, Home/End to row bounds, Ctrl+Home/End to grid bounds); Tab again leaves the grid.