Give hover state to picker items, keystrokes in command palette
This commit is contained in:
parent
a60c75e343
commit
8481834847
20 changed files with 269 additions and 288 deletions
|
@ -193,13 +193,7 @@ impl View for SidebarButtons {
|
|||
Flex::row()
|
||||
.with_children(items.iter().enumerate().map(|(ix, item)| {
|
||||
MouseEventHandler::new::<Self, _, _>(ix, cx, move |state, _| {
|
||||
let style = if Some(ix) == active_ix {
|
||||
item_style.active()
|
||||
} else if state.hovered {
|
||||
item_style.hover()
|
||||
} else {
|
||||
&item_style.default
|
||||
};
|
||||
let style = item_style.style_for(state, Some(ix) == active_ix);
|
||||
Svg::new(item.icon_path)
|
||||
.with_color(style.icon_color)
|
||||
.constrained()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue