diff --git a/src/keyframes/button.rs b/src/keyframes/button.rs index 0d28901..b2d9237 100644 --- a/src/keyframes/button.rs +++ b/src/keyframes/button.rs @@ -1,5 +1,5 @@ use self::iced_core::{widget::Id as IcedId, Element, Length, Padding, Renderer as IcedRenderer}; -use crate::reexports::{iced_core, iced_widget, Theme}; +use crate::reexports::{iced_core, iced_style, iced_widget}; use crate::keyframes::{as_f32, get_length, Repeat}; use crate::timeline::Frame; @@ -36,13 +36,14 @@ impl Id { } /// Used by [`crate::anim!`] macro - pub fn as_widget<'a, Message, Renderer>( + pub fn as_widget<'a, Message, Theme, Renderer>( self, timeline: &crate::Timeline, content: impl Into>, ) -> iced_widget::Button<'a, Message, Theme, Renderer> where Renderer: IcedRenderer, + Theme: iced_style::button::StyleSheet, { Button::as_widget(self, timeline, content) } @@ -144,13 +145,14 @@ impl Button { } } - pub fn as_widget<'a, Message, Renderer>( + pub fn as_widget<'a, Message, Theme, Renderer>( id: Id, timeline: &crate::Timeline, content: impl Into>, ) -> iced_widget::Button<'a, Message, Theme, Renderer> where Renderer: IcedRenderer, + Theme: iced_style::button::StyleSheet, { let id: IcedId = id.into(); diff --git a/src/keyframes/column.rs b/src/keyframes/column.rs index 5886e30..9de019e 100644 --- a/src/keyframes/column.rs +++ b/src/keyframes/column.rs @@ -1,7 +1,7 @@ use crate::reexports::iced_core::{ widget::Id as IcedId, Length, Padding, Pixels, Renderer as IcedRenderer, }; -use crate::reexports::{iced_widget, Theme}; +use crate::reexports::iced_widget; use crate::keyframes::{as_f32, get_length, Repeat}; use crate::timeline::Frame; @@ -39,7 +39,7 @@ impl Id { /// Used by [`crate::anim!`] macro #[must_use] - pub fn as_widget<'a, Message, Renderer>( + pub fn as_widget<'a, Message, Theme, Renderer>( self, timeline: &crate::Timeline, ) -> iced_widget::Column<'a, Message, Theme, Renderer> @@ -149,7 +149,7 @@ impl Column { } } - pub fn as_widget<'a, Message, Renderer>( + pub fn as_widget<'a, Message, Theme, Renderer>( id: Id, timeline: &crate::Timeline, ) -> iced_widget::Column<'a, Message, Theme, Renderer> diff --git a/src/keyframes/row.rs b/src/keyframes/row.rs index 07b64e0..3fa9afd 100644 --- a/src/keyframes/row.rs +++ b/src/keyframes/row.rs @@ -1,7 +1,7 @@ use crate::reexports::iced_core::{ widget::Id as IcedId, Length, Padding, Pixels, Renderer as IcedRenderer, }; -use crate::reexports::{iced_widget, Theme}; +use crate::reexports::iced_widget; use crate::keyframes::{as_f32, get_length, Repeat}; use crate::timeline::Frame; @@ -39,7 +39,7 @@ impl Id { /// Used by [`crate::anim!`] macro #[must_use] - pub fn as_iced_widget<'a, Message, Renderer>( + pub fn as_iced_widget<'a, Message, Theme, Renderer>( self, timeline: &crate::Timeline, ) -> iced_widget::Row<'a, Message, Theme, Renderer> @@ -149,7 +149,7 @@ impl Row { } } - pub fn as_iced_widget<'a, Message, Renderer>( + pub fn as_iced_widget<'a, Message, Theme, Renderer>( id: Id, timeline: &crate::Timeline, ) -> iced_widget::Row<'a, Message, Theme, Renderer> diff --git a/src/keyframes/style_button.rs b/src/keyframes/style_button.rs index 7f1f8a7..0f6599a 100644 --- a/src/keyframes/style_button.rs +++ b/src/keyframes/style_button.rs @@ -1,8 +1,7 @@ +use crate::keyframes::{as_f32, get_length, Repeat}; use crate::reexports::iced_core::{widget, Element, Length, Padding, Renderer as IcedRenderer}; use crate::reexports::iced_style::button::StyleSheet; use crate::reexports::Theme; - -use crate::keyframes::{as_f32, get_length, Repeat}; use crate::timeline::{Frame, Interped}; use crate::{Ease, Linear, MovementType}; diff --git a/src/keyframes/toggler.rs b/src/keyframes/toggler.rs index 4797975..ce25d4f 100644 --- a/src/keyframes/toggler.rs +++ b/src/keyframes/toggler.rs @@ -1,5 +1,4 @@ use crate::reexports::iced_core::{text, widget::Id as IcedId, Renderer as IcedRenderer}; -use crate::reexports::iced_widget; use crate::keyframes::Repeat; use crate::timeline::Frame;