fix: don't allow for leading dividers in the menu
This commit is contained in:
parent
34caca1387
commit
8c0e57835b
1 changed files with 2 additions and 1 deletions
|
|
@ -445,7 +445,8 @@ pub fn menu_items<
|
|||
));
|
||||
}
|
||||
MenuItem::Divider => {
|
||||
if i != size - 1 {
|
||||
// A divider at either end separates nothing
|
||||
if i != 0 && i != size - 1 {
|
||||
trees.push(MenuTree::<Message>::from(Element::from(
|
||||
widget::divider::horizontal::light(),
|
||||
)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue