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,7 +1,7 @@
|
|||
//! Build interactive cross-platform applications.
|
||||
use crate::{Command, Element, Executor, Settings, Subscription};
|
||||
|
||||
pub use iced_native::application::{Appearance, StyleSheet};
|
||||
pub use crate::style::application::{Appearance, StyleSheet};
|
||||
|
||||
/// An interactive cross-platform application.
|
||||
///
|
||||
|
|
@ -198,24 +198,24 @@ pub trait Application: Sized {
|
|||
default_font: settings.default_font,
|
||||
default_text_size: settings.default_text_size,
|
||||
antialiasing: if settings.antialiasing {
|
||||
Some(crate::renderer::Antialiasing::MSAAx4)
|
||||
Some(crate::graphics::Antialiasing::MSAAx4)
|
||||
} else {
|
||||
None
|
||||
},
|
||||
..crate::renderer::Settings::default()
|
||||
};
|
||||
|
||||
Ok(crate::runtime::application::run::<
|
||||
Ok(crate::shell::application::run::<
|
||||
Instance<Self>,
|
||||
Self::Executor,
|
||||
crate::renderer::window::Compositor<Self::Theme>,
|
||||
crate::renderer::Compositor<Self::Theme>,
|
||||
>(settings.into(), renderer_settings)?)
|
||||
}
|
||||
}
|
||||
|
||||
struct Instance<A: Application>(A);
|
||||
|
||||
impl<A> iced_winit::Program for Instance<A>
|
||||
impl<A> crate::native::Program for Instance<A>
|
||||
where
|
||||
A: Application,
|
||||
{
|
||||
|
|
@ -231,7 +231,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<A> crate::runtime::Application for Instance<A>
|
||||
impl<A> crate::shell::Application for Instance<A>
|
||||
where
|
||||
A: Application,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue