summaryrefslogtreecommitdiffstats
path: root/widget/src/shader.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-10-25 19:28:18 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-11-05 23:52:58 +0100
commitdcc184b01b753dbecb500205391f6eaaa21c8683 (patch)
tree9f1854261c3b3805e28f524df65487c09c9729f7 /widget/src/shader.rs
parent752403d70c851ece620c4007710062b158e8dec3 (diff)
downloadiced-dcc184b01b753dbecb500205391f6eaaa21c8683.tar.gz
iced-dcc184b01b753dbecb500205391f6eaaa21c8683.tar.bz2
iced-dcc184b01b753dbecb500205391f6eaaa21c8683.zip
Replace `event::Status` in `Widget::on_event` with `Shell::capture_event`
Diffstat (limited to '')
-rw-r--r--widget/src/shader.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/widget/src/shader.rs b/widget/src/shader.rs
index fa692336..5e4d3915 100644
--- a/widget/src/shader.rs
+++ b/widget/src/shader.rs
@@ -97,7 +97,7 @@ where
_clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
_viewport: &Rectangle,
- ) -> event::Status {
+ ) {
let bounds = layout.bounds();
let custom_shader_event = match event {
@@ -115,22 +115,14 @@ where
if let Some(custom_shader_event) = custom_shader_event {
let state = tree.state.downcast_mut::<P::State>();
- let (event_status, message) = self.program.update(
+ self.program.update(
state,
custom_shader_event,
bounds,
cursor,
shell,
);
-
- if let Some(message) = message {
- shell.publish(message);
- }
-
- return event_status;
}
-
- event::Status::Ignored
}
fn mouse_interaction(
@@ -195,8 +187,8 @@ where
bounds: Rectangle,
cursor: mouse::Cursor,
shell: &mut Shell<'_, Message>,
- ) -> (event::Status, Option<Message>) {
- T::update(self, state, event, bounds, cursor, shell)
+ ) {
+ T::update(self, state, event, bounds, cursor, shell);
}
fn draw(