summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-17 14:41:34 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-17 14:41:34 +0100
commitc4b4207f4768c7e254ff0a6bf95c4d76ea08ce48 (patch)
treec2f72adcc6d016186ca486595e4f0a514fdff402 /src/lib.rs
parenta034e40f7c0e325938da92894ee34f589f372e0a (diff)
downloadiced-c4b4207f4768c7e254ff0a6bf95c4d76ea08ce48.tar.gz
iced-c4b4207f4768c7e254ff0a6bf95c4d76ea08ce48.tar.bz2
iced-c4b4207f4768c7e254ff0a6bf95c4d76ea08ce48.zip
Support custom themes in `Program` API
Diffstat (limited to '')
-rw-r--r--src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d238e78a..bc87b1a3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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()
}