Create iced_widget subcrate and re-organize the whole codebase
This commit is contained in:
parent
c54409d171
commit
3a0d34c024
209 changed files with 1959 additions and 2183 deletions
|
|
@ -1,12 +1,10 @@
|
|||
use iced::event::{Event, MacOS, PlatformSpecific};
|
||||
use iced::executor;
|
||||
use iced::subscription;
|
||||
use iced::widget::{container, text};
|
||||
use iced::{
|
||||
Application, Command, Element, Length, Settings, Subscription, Theme,
|
||||
};
|
||||
use iced_native::{
|
||||
event::{MacOS, PlatformSpecific},
|
||||
Event,
|
||||
};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
App::run(Settings::default())
|
||||
|
|
@ -19,7 +17,7 @@ struct App {
|
|||
|
||||
#[derive(Debug, Clone)]
|
||||
enum Message {
|
||||
EventOccurred(iced_native::Event),
|
||||
EventOccurred(Event),
|
||||
}
|
||||
|
||||
impl Application for App {
|
||||
|
|
@ -52,7 +50,7 @@ impl Application for App {
|
|||
}
|
||||
|
||||
fn subscription(&self) -> Subscription<Message> {
|
||||
iced_native::subscription::events().map(Message::EventOccurred)
|
||||
subscription::events().map(Message::EventOccurred)
|
||||
}
|
||||
|
||||
fn view(&self) -> Element<Message> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue