Fix style of menu folders
This commit is contained in:
parent
cf6a35474e
commit
973018fdb7
2 changed files with 25 additions and 5 deletions
|
|
@ -299,7 +299,17 @@ where
|
|||
.size(16)
|
||||
.icon()
|
||||
.into(),
|
||||
]),
|
||||
])
|
||||
.style(
|
||||
// Menu folders have no on_press so they take on the disabled style by default
|
||||
if children.is_empty() {
|
||||
// This will make the folder use the disabled style if it has no children
|
||||
theme::Button::MenuItem
|
||||
} else {
|
||||
// This will make the folder use the enabled style if it has children
|
||||
theme::Button::MenuFolder
|
||||
},
|
||||
),
|
||||
menu_items(key_binds, children),
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue