summaryrefslogtreecommitdiffstats
path: root/examples/modal
diff options
context:
space:
mode:
Diffstat (limited to 'examples/modal')
-rw-r--r--examples/modal/Cargo.toml3
-rw-r--r--examples/modal/src/main.rs8
2 files changed, 7 insertions, 4 deletions
diff --git a/examples/modal/Cargo.toml b/examples/modal/Cargo.toml
index 3ac61e6a..009d9653 100644
--- a/examples/modal/Cargo.toml
+++ b/examples/modal/Cargo.toml
@@ -6,4 +6,5 @@ edition = "2021"
publish = false
[dependencies]
-iced = { path = "../..", features = ["advanced"] }
+iced.workspace = true
+iced.features = ["advanced"]
diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs
index aa9107d0..c050d3cc 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> {