summaryrefslogtreecommitdiffstats
path: root/examples/modal
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-09-07 03:10:57 +0200
committerLibravatar GitHub <noreply@github.com>2023-09-07 03:10:57 +0200
commitc8fed143eb14d790da0592c5e24c741f6fda101e (patch)
treecf7f002d1ac7e2a8c036f1d420238d69ab45407b /examples/modal
parenta56b25b9096d47ada3c4349f5b91110dfaa92bf6 (diff)
parentd21f0698b505d699c44e9414f902dbeca9474e39 (diff)
downloadiced-c8fed143eb14d790da0592c5e24c741f6fda101e.tar.gz
iced-c8fed143eb14d790da0592c5e24c741f6fda101e.tar.bz2
iced-c8fed143eb14d790da0592c5e24c741f6fda101e.zip
Merge pull request #2073 from iced-rs/event-helpers
Add `keyboard` subscriptions and rename `subscription::events` to `event::listen`
Diffstat (limited to 'examples/modal')
-rw-r--r--examples/modal/src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs
index 8a48f830..4aa70886 100644
--- a/examples/modal/src/main.rs
+++ b/examples/modal/src/main.rs
@@ -1,12 +1,14 @@
+use iced::event::{self, Event};
use iced::executor;
use iced::keyboard;
-use iced::subscription::{self, Subscription};
use iced::theme;
use iced::widget::{
self, button, column, container, horizontal_space, pick_list, row, text,
text_input,
};
-use iced::{Alignment, Application, Command, Element, Event, Length, Settings};
+use iced::{
+ Alignment, Application, Command, Element, Length, Settings, Subscription,
+};
use modal::Modal;
use std::fmt;
@@ -49,7 +51,7 @@ impl Application for App {
}
fn subscription(&self) -> Subscription<Self::Message> {
- subscription::events().map(Message::Event)
+ event::listen().map(Message::Event)
}
fn update(&mut self, message: Message) -> Command<Message> {