mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-05 03:28:11 +08:00
Fix dropdown keyboard movement bug (#1630)
* Add a value to all `MenuListEntry` * cargo fmt * Make `value` as constructor in `MenuListEntry` * Make `value` as constructor in `RadioEntryData`
This commit is contained in:
@@ -129,8 +129,12 @@ pub fn overlay_options(grid: &GridSnapping) -> Vec<LayoutGroup> {
|
||||
TextLabel::new("Type").table_align(true).widget_holder(),
|
||||
Separator::new(SeparatorType::Unrelated).widget_holder(),
|
||||
RadioInput::new(vec![
|
||||
RadioEntryData::new("Rectangular").on_update(update_val(grid, |grid, _| grid.grid_type = GridType::RECTANGLE)),
|
||||
RadioEntryData::new("Isometric").on_update(update_val(grid, |grid, _| grid.grid_type = GridType::ISOMETRIC)),
|
||||
RadioEntryData::new("rectangular")
|
||||
.label("Rectangular")
|
||||
.on_update(update_val(grid, |grid, _| grid.grid_type = GridType::RECTANGLE)),
|
||||
RadioEntryData::new("isometric")
|
||||
.label("Isometric")
|
||||
.on_update(update_val(grid, |grid, _| grid.grid_type = GridType::ISOMETRIC)),
|
||||
])
|
||||
.min_width(200)
|
||||
.selected_index(Some(if matches!(grid.grid_type, GridType::Rectangle { .. }) { 0 } else { 1 }))
|
||||
|
||||
Reference in New Issue
Block a user