Group preset list and clear button in game_of_life example

This commit is contained in:
Héctor Ramón Jiménez 2024-03-08 00:38:02 +01:00
parent f316755cdc
commit 76627bb481
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -185,17 +185,14 @@ fn view_controls<'a>(
row![
playback_controls,
speed_controls,
checkbox("Grid", is_grid_enabled)
.on_toggle(Message::ToggleGrid)
.size(16)
.spacing(5)
.text_size(16),
pick_list(preset::ALL, Some(preset), Message::PresetPicked)
.padding(8)
.text_size(16),
button("Clear")
.on_press(Message::Clear)
.style(button::danger),
checkbox("Grid", is_grid_enabled).on_toggle(Message::ToggleGrid),
row![
pick_list(preset::ALL, Some(preset), Message::PresetPicked),
button("Clear")
.on_press(Message::Clear)
.style(button::danger)
]
.spacing(10)
]
.padding(10)
.spacing(20)