From 4407385fbe629eb079b0166649492da5f689ea95 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 8 Jul 2022 23:38:34 +0200 Subject: Make `Element` aliases in `iced` compatible with `iced_native` and `iced_pure` --- src/application.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/application.rs') diff --git a/src/application.rs b/src/application.rs index 4edfb063..e8d8e982 100644 --- a/src/application.rs +++ b/src/application.rs @@ -139,7 +139,9 @@ pub trait Application: Sized { /// Returns the widgets to display in the [`Application`]. /// /// These widgets can produce __messages__ based on user interaction. - fn view(&mut self) -> Element<'_, Self::Message, Self::Theme>; + fn view( + &mut self, + ) -> Element<'_, Self::Message, crate::Renderer>; /// Returns the current [`Theme`] of the [`Application`]. /// @@ -239,14 +241,14 @@ impl iced_winit::Program for Instance where A: Application, { - type Renderer = crate::renderer::Renderer; + type Renderer = crate::Renderer; type Message = A::Message; fn update(&mut self, message: Self::Message) -> Command { self.0.update(message) } - fn view(&mut self) -> Element<'_, Self::Message, A::Theme> { + fn view(&mut self) -> Element<'_, Self::Message, Self::Renderer> { self.0.view() } } -- cgit