Support custom themes in Program API

This commit is contained in:
Héctor Ramón Jiménez 2024-03-17 14:41:34 +01:00
parent a034e40f7c
commit c4b4207f47
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 20 additions and 17 deletions

View file

@ -373,14 +373,15 @@ pub type Result = std::result::Result<(), Error>;
/// ]
/// }
/// ```
pub fn run<State, Message>(
pub fn run<State, Message, Theme>(
title: impl application::Title<State> + 'static,
update: impl application::Update<State, Message> + 'static,
view: impl for<'a> application::View<'a, State, Message> + 'static,
view: impl for<'a> application::View<'a, State, Message, Theme> + 'static,
) -> Result
where
State: Default + 'static,
Message: std::fmt::Debug + Send + 'static,
Theme: Default + application::DefaultStyle + 'static,
{
program(title, update, view).run()
}