summaryrefslogtreecommitdiffstats
path: root/examples/multi_window
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-29 22:28:31 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-29 22:28:31 +0100
commite09b4e24dda51b8212d8ece52431dacaa3922a7b (patch)
tree7005e181528134ebdde5bbbe5909273db9f30174 /examples/multi_window
parent83c7870c569a2976923ee6243a19813094d44673 (diff)
parent7f8b17604a31e00becc43130ec516c1a53552c88 (diff)
downloadiced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.gz
iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.bz2
iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.zip
Merge branch 'master' into feat/multi-window-support
Diffstat (limited to 'examples/multi_window')
-rw-r--r--examples/multi_window/src/main.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/multi_window/src/main.rs b/examples/multi_window/src/main.rs
index 51ec3595..7d1f1e91 100644
--- a/examples/multi_window/src/main.rs
+++ b/examples/multi_window/src/main.rs
@@ -1,9 +1,10 @@
+use iced::event;
+use iced::executor;
use iced::multi_window::{self, Application};
use iced::widget::{button, column, container, scrollable, text, text_input};
-use iced::window::{Id, Position};
+use iced::window;
use iced::{
- executor, subscription, window, Alignment, Command, Element, Length,
- Settings, Subscription, Theme,
+ Alignment, Command, Element, Length, Settings, Subscription, Theme,
};
use std::collections::HashMap;
@@ -47,7 +48,7 @@ impl multi_window::Application for Example {
(
Example {
windows: HashMap::from([(window::Id::MAIN, Window::new(1))]),
- next_window_pos: Position::Default,
+ next_window_pos: window::Position::Default,
},
Command::none(),
)
@@ -129,7 +130,7 @@ impl multi_window::Application for Example {
.into()
}
- fn theme(&self, window: Id) -> Self::Theme {
+ fn theme(&self, window: window::Id) -> Self::Theme {
self.windows.get(&window).unwrap().theme.clone()
}
@@ -141,7 +142,7 @@ impl multi_window::Application for Example {
}
fn subscription(&self) -> Subscription<Self::Message> {
- subscription::events_with(|event, _| {
+ event::listen_with(|event, _| {
if let iced::Event::Window(id, window_event) = event {
match window_event {
window::Event::CloseRequested => {