Skip to main content

Module picture_choice

Module picture_choice 

Expand description

PictureChoice: a choice among pictures, for a setting whose meaning is visual (a text size, a pointer size, a colour filter). Each option is a tile showing its Picture over its name; the chosen tile carries the selected edge.

The tiles fill each line evenly, as many on a line as fit at their narrowest (picture_tile_min_width), rounded down to a count that fills every line alike, so a narrow window shows two lines of two rather than three and an orphan. Names are captions, which grow with the text scale.

A choice binds like a segmented strip: PictureChoice::on_action invokes an action with the chosen index (a pane binds it to its setting’s edit), and PictureChoice::from_state keeps the choice in view state both ways. While an action is bound the chosen tile follows the value the action wrote, never the press, so a refused choice is never shown as made.

Keyboard: one tab stop; the arrow keys move between tiles (up and down by a line), Home and End to the ends, Enter or Space chooses. Assistive technology sees a group of radio buttons, each with its name, whether it is chosen, its position and where it is drawn, and chooses one with Activate.

Structs§

PictureChoice
PictureChoiceProps
A choice among pictures whose meaning is visual: a text size, a pointer size, a colour filter. Each tile shows its picture over its name, and the chosen tile carries the selection edge.
PictureOption
One option of a PictureChoice: its picture and its name.
PictureOptionProps
One tile of a PictureChoice: its picture and its name.

Enums§

ColourFilter
A whole-screen colour transform, as the compositor applies it.
Picture
What a choice’s tile shows.
PictureKind
The picture a tile shows: one of the design system’s own samples, the way a settings pane shows what a choice means.
TouchpadGesture
What a touchpad picture shows the fingers doing.