summaryrefslogtreecommitdiffstats
path: root/native/src/widget/radio.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-12-02 17:47:44 +0700
committerLibravatar GitHub <noreply@github.com>2021-12-02 17:47:44 +0700
commit26d053ab3887b73f854a1174864d0fec221c5c9b (patch)
treea6cf758c934638e3dd9586781dfb62e1cf028572 /native/src/widget/radio.rs
parentd9f970ffd5af6dafb5e696ad317d9ea7b997eb4b (diff)
parentbbd9355450bc2df3a2c0e37cc900ba00b26255af (diff)
downloadiced-26d053ab3887b73f854a1174864d0fec221c5c9b.tar.gz
iced-26d053ab3887b73f854a1174864d0fec221c5c9b.tar.bz2
iced-26d053ab3887b73f854a1174864d0fec221c5c9b.zip
Merge pull request #1131 from iced-rs/component-trait
`iced_lazy` and `Component` trait
Diffstat (limited to 'native/src/widget/radio.rs')
-rw-r--r--native/src/widget/radio.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs
index 86ad4c4e..523773bd 100644
--- a/native/src/widget/radio.rs
+++ b/native/src/widget/radio.rs
@@ -11,7 +11,7 @@ use crate::touch;
use crate::widget::{self, Row, Text};
use crate::{
Alignment, Clipboard, Color, Element, Hasher, Layout, Length, Point,
- Rectangle, Widget,
+ Rectangle, Shell, Widget,
};
pub use iced_style::radio::{Style, StyleSheet};
@@ -187,13 +187,13 @@ where
cursor_position: Point,
_renderer: &Renderer,
_clipboard: &mut dyn Clipboard,
- messages: &mut Vec<Message>,
+ shell: &mut Shell<'_, Message>,
) -> event::Status {
match event {
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left))
| Event::Touch(touch::Event::FingerPressed { .. }) => {
if layout.bounds().contains(cursor_position) {
- messages.push(self.on_click.clone());
+ shell.publish(self.on_click.clone());
return event::Status::Captured;
}