Merge branch 'master' into feature/test-recorder
This commit is contained in:
commit
26c9dc1709
83 changed files with 2627 additions and 1208 deletions
|
|
@ -602,17 +602,16 @@ where
|
|||
|
||||
if is_focused {
|
||||
self.state.with_inner(|state| {
|
||||
if !started_focused {
|
||||
if let Some(on_option_hovered) = &mut self.on_option_hovered
|
||||
{
|
||||
let hovered_option = menu.hovered_option.unwrap_or(0);
|
||||
if !started_focused
|
||||
&& let Some(on_option_hovered) = &mut self.on_option_hovered
|
||||
{
|
||||
let hovered_option = menu.hovered_option.unwrap_or(0);
|
||||
|
||||
if let Some(option) =
|
||||
state.filtered_options.options.get(hovered_option)
|
||||
{
|
||||
shell.publish(on_option_hovered(option.clone()));
|
||||
published_message_to_shell = true;
|
||||
}
|
||||
if let Some(option) =
|
||||
state.filtered_options.options.get(hovered_option)
|
||||
{
|
||||
shell.publish(on_option_hovered(option.clone()));
|
||||
published_message_to_shell = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -625,12 +624,11 @@ where
|
|||
let shift_modifier = modifiers.shift();
|
||||
match (named_key, shift_modifier) {
|
||||
(key::Named::Enter, _) => {
|
||||
if let Some(index) = &menu.hovered_option {
|
||||
if let Some(option) =
|
||||
if let Some(index) = &menu.hovered_option
|
||||
&& let Some(option) =
|
||||
state.filtered_options.options.get(*index)
|
||||
{
|
||||
menu.new_selection = Some(option.clone());
|
||||
}
|
||||
{
|
||||
menu.new_selection = Some(option.clone());
|
||||
}
|
||||
|
||||
shell.capture_event();
|
||||
|
|
@ -653,21 +651,19 @@ where
|
|||
|
||||
if let Some(on_option_hovered) =
|
||||
&mut self.on_option_hovered
|
||||
{
|
||||
if let Some(option) =
|
||||
&& let Some(option) =
|
||||
menu.hovered_option.and_then(|index| {
|
||||
state
|
||||
.filtered_options
|
||||
.options
|
||||
.get(index)
|
||||
})
|
||||
{
|
||||
// Notify the selection
|
||||
shell.publish((on_option_hovered)(
|
||||
option.clone(),
|
||||
));
|
||||
published_message_to_shell = true;
|
||||
}
|
||||
{
|
||||
// Notify the selection
|
||||
shell.publish((on_option_hovered)(
|
||||
option.clone(),
|
||||
));
|
||||
published_message_to_shell = true;
|
||||
}
|
||||
|
||||
shell.capture_event();
|
||||
|
|
@ -701,21 +697,19 @@ where
|
|||
|
||||
if let Some(on_option_hovered) =
|
||||
&mut self.on_option_hovered
|
||||
{
|
||||
if let Some(option) =
|
||||
&& let Some(option) =
|
||||
menu.hovered_option.and_then(|index| {
|
||||
state
|
||||
.filtered_options
|
||||
.options
|
||||
.get(index)
|
||||
})
|
||||
{
|
||||
// Notify the selection
|
||||
shell.publish((on_option_hovered)(
|
||||
option.clone(),
|
||||
));
|
||||
published_message_to_shell = true;
|
||||
}
|
||||
{
|
||||
// Notify the selection
|
||||
shell.publish((on_option_hovered)(
|
||||
option.clone(),
|
||||
));
|
||||
published_message_to_shell = true;
|
||||
}
|
||||
|
||||
shell.capture_event();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue