-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
low priolow priority issuelow priority issue
Description
Tracking issue for the cell2 rewrite.
API
let cell = Cell2::with_entries(
Text::new("Wassup").width(Length::Fill).into(),
&mut self.cell_state,
vec![
Entry::Item(Text::new("Test1").into(), Some(Message::Test1)),
Entry::Group(
Text::new("submenu").into(),
vec![
Entry::Item(Text::new("Test2").into(), Some(Message::Test2)),
Entry::Item(Text::new("Test3").into(), Some(Message::Test3)),
Entry::Group(
Text::new("submenu").into(),
vec![
Entry::Item(Text::new("Test2").into(), Some(Message::Test2)),
Entry::Item(Text::new("Test3").into(), Some(Message::Test3)),
],
),
],
),
],
)
.set_single_click(|| Message::Toggle);
Blockers
- Consistent Text API to control sizing per cell instantiation
- Port over CellList to use cell2
Motivation
The previous implimentation (cell) suffered from two issues: bad test rendering, poor api for nested menus. Cell2 remedies these problems by leveraging Text widgets from iced native to handle rendering and using the Entry API to have a low level API to describe nested menus.
For posterity, the previous effort to handle nested menus was through the implimentation of a CellOption trait that could be derived via proc macro. This approach ultimately failed due to the fact that it created an opaque abstraction that was hard to customize (e.g. toggable entries of menu, mutually exclusive entries of a menu, etc).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
low priolow priority issuelow priority issue