diff options
author | 2024-12-06 04:06:41 +0100 | |
---|---|---|
committer | 2024-12-10 04:51:08 +0100 | |
commit | 1aeb317f2dbfb63215e6226073e67878ffa6503b (patch) | |
tree | d883266d796360a1e4d883dc82a4fb284f724790 /src/application.rs | |
parent | 8e3636d769d96ab5ba49a9647b72c59ae2226dd0 (diff) | |
download | iced-1aeb317f2dbfb63215e6226073e67878ffa6503b.tar.gz iced-1aeb317f2dbfb63215e6226073e67878ffa6503b.tar.bz2 iced-1aeb317f2dbfb63215e6226073e67878ffa6503b.zip |
Add image and hash snapshot-based testing to `iced_test`
Diffstat (limited to 'src/application.rs')
-rw-r--r-- | src/application.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/application.rs b/src/application.rs index 2ba764be..c79ed62b 100644 --- a/src/application.rs +++ b/src/application.rs @@ -31,6 +31,7 @@ //! } //! ``` use crate::program::{self, Program}; +use crate::theme; use crate::window; use crate::{ Element, Executor, Font, Result, Settings, Size, Subscription, Task, @@ -38,8 +39,6 @@ use crate::{ use std::borrow::Cow; -pub use crate::shell::program::{Appearance, DefaultStyle}; - /// Creates an iced [`Application`] given its title, update, and view logic. /// /// # Example @@ -76,7 +75,7 @@ pub fn application<State, Message, Theme, Renderer>( where State: 'static, Message: Send + std::fmt::Debug + 'static, - Theme: Default + DefaultStyle, + Theme: Default + theme::Base, Renderer: program::Renderer, { use std::marker::PhantomData; @@ -94,7 +93,7 @@ where for Instance<State, Message, Theme, Renderer, Update, View> where Message: Send + std::fmt::Debug + 'static, - Theme: Default + DefaultStyle, + Theme: Default + theme::Base, Renderer: program::Renderer, Update: self::Update<State, Message>, View: for<'a> self::View<'a, State, Message, Theme, Renderer>, @@ -352,7 +351,7 @@ impl<P: Program> Application<P> { /// Sets the style logic of the [`Application`]. pub fn style( self, - f: impl Fn(&P::State, &P::Theme) -> Appearance, + f: impl Fn(&P::State, &P::Theme) -> theme::Style, ) -> Application< impl Program<State = P::State, Message = P::Message, Theme = P::Theme>, > { |