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
|
@ -223,14 +223,16 @@ impl PickerDelegate for FileFinder {
|
|||
cx.emit(Event::Dismissed);
|
||||
}
|
||||
|
||||
fn render_match(&self, ix: usize, selected: bool, cx: &AppContext) -> ElementBox {
|
||||
fn render_match(
|
||||
&self,
|
||||
ix: usize,
|
||||
mouse_state: &MouseState,
|
||||
selected: bool,
|
||||
cx: &AppContext,
|
||||
) -> ElementBox {
|
||||
let path_match = &self.matches[ix];
|
||||
let settings = cx.global::<Settings>();
|
||||
let style = if selected {
|
||||
&settings.theme.picker.active_item
|
||||
} else {
|
||||
&settings.theme.picker.item
|
||||
};
|
||||
let style = settings.theme.picker.item.style_for(mouse_state, selected);
|
||||
let (file_name, file_name_positions, full_path, full_path_positions) =
|
||||
self.labels_for_match(path_match);
|
||||
Flex::column()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue