feat: drag and drop (outside of wayland)
This commit is contained in:
parent
b11264dc4b
commit
c3a5919e87
1 changed files with 10 additions and 0 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -111,6 +111,16 @@ impl State {
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Message::Event(iced::Event::Window(window_event)) => match window_event {
|
||||||
|
window::Event::FileDropped(file) => {
|
||||||
|
self.error = self.load_image(file);
|
||||||
|
return self.allocate_image();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore unused window events
|
||||||
|
_ => {}
|
||||||
|
},
|
||||||
|
|
||||||
// ignore unused events
|
// ignore unused events
|
||||||
Message::Event(_) => {}
|
Message::Event(_) => {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue