diff options
author | 2024-12-17 17:28:46 +0100 | |
---|---|---|
committer | 2024-12-17 17:28:46 +0100 | |
commit | f2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470 (patch) | |
tree | 4941905adf134468acc079610bb6f25d7461d543 /src/daemon.rs | |
parent | a687a837653a576cb0599f7bc8ecd9c6054213a9 (diff) | |
parent | e5545aaa579f428e45853d125ac86155d8395104 (diff) | |
download | iced-f2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470.tar.gz iced-f2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470.tar.bz2 iced-f2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470.zip |
Merge pull request #2698 from iced-rs/feature/test-crate
Headless Mode Testing
Diffstat (limited to 'src/daemon.rs')
-rw-r--r-- | src/daemon.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/daemon.rs b/src/daemon.rs index 81254bf9..fd6d0278 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -1,13 +1,12 @@ //! Create and run daemons that run in the background. use crate::application; use crate::program::{self, Program}; +use crate::theme; use crate::window; use crate::{Element, Executor, Font, Result, Settings, Subscription, Task}; use std::borrow::Cow; -pub use crate::shell::program::{Appearance, DefaultStyle}; - /// Creates an iced [`Daemon`] given its title, update, and view logic. /// /// A [`Daemon`] will not open a window by default, but will run silently @@ -26,7 +25,7 @@ pub fn daemon<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; @@ -44,7 +43,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: application::Update<State, Message>, View: for<'a> self::View<'a, State, Message, Theme, Renderer>, @@ -201,7 +200,7 @@ impl<P: Program> Daemon<P> { /// Sets the style logic of the [`Daemon`]. pub fn style( self, - f: impl Fn(&P::State, &P::Theme) -> Appearance, + f: impl Fn(&P::State, &P::Theme) -> theme::Style, ) -> Daemon< impl Program<State = P::State, Message = P::Message, Theme = P::Theme>, > { |