diff options
author | 2023-07-26 22:36:50 +0200 | |
---|---|---|
committer | 2023-07-26 22:53:53 +0200 | |
commit | e29754f32d03efc4b075e9b63cc554d128bc2ccf (patch) | |
tree | 61e57a9ca9b7a8459be0e88d274f037584621cf0 /widget/src/combo_box.rs | |
parent | a0a3cf7eb71ca9a934a60144b92c555cf7efe69a (diff) | |
download | iced-e29754f32d03efc4b075e9b63cc554d128bc2ccf.tar.gz iced-e29754f32d03efc4b075e9b63cc554d128bc2ccf.tar.bz2 iced-e29754f32d03efc4b075e9b63cc554d128bc2ccf.zip |
Rename `on_selection` to `on_option_hovered` in `combo_box`
Diffstat (limited to 'widget/src/combo_box.rs')
-rw-r--r-- | widget/src/combo_box.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs index 14fe2528..93fc92b9 100644 --- a/widget/src/combo_box.rs +++ b/widget/src/combo_box.rs @@ -89,9 +89,9 @@ where /// [`ComboBox`] is hovered using the arrow keys. pub fn on_option_hovered( mut self, - on_selection: impl Fn(T) -> Message + 'static, + on_option_hovered: impl Fn(T) -> Message + 'static, ) -> Self { - self.on_option_hovered = Some(Box::new(on_selection)); + self.on_option_hovered = Some(Box::new(on_option_hovered)); self } @@ -490,7 +490,7 @@ where menu.hovered_option = Some(0); } - if let Some(on_selection) = + if let Some(on_option_hovered) = &mut self.on_option_hovered { if let Some(option) = @@ -502,7 +502,7 @@ where }) { // Notify the selection - shell.publish((on_selection)( + shell.publish((on_option_hovered)( option.clone(), )); published_message_to_shell = true; @@ -524,7 +524,7 @@ where menu.hovered_option = Some(0); } - if let Some(on_selection) = + if let Some(on_option_hovered) = &mut self.on_option_hovered { if let Some(option) = @@ -536,7 +536,7 @@ where }) { // Notify the selection - shell.publish((on_selection)( + shell.publish((on_option_hovered)( option.clone(), )); published_message_to_shell = true; |