feat!(widget): rewrite button & icon widget APIs

This commit is contained in:
Michael Aaron Murphy 2023-09-01 07:29:19 +02:00 committed by Michael Murphy
parent 18debe546d
commit 4e4eeaac12
60 changed files with 2191 additions and 1113 deletions

View file

@ -41,9 +41,9 @@ impl<'a, Message: 'static> ListColumn<'a, Message> {
#[must_use]
pub fn into_element(self) -> Element<'a, Message> {
iced::widget::column(self.children)
crate::widget::column::with_children(self.children)
.spacing(12)
.apply(iced::widget::container)
.apply(crate::widget::container)
.padding([16, 6])
.style(theme::Container::custom(style))
.into()
@ -58,9 +58,10 @@ impl<'a, Message: 'static> From<ListColumn<'a, Message>> for Element<'a, Message
#[must_use]
#[allow(clippy::trivially_copy_pass_by_ref)]
pub fn style(theme: &crate::Theme) -> iced::widget::container::Appearance {
pub fn style(theme: &crate::Theme) -> crate::widget::container::Appearance {
let container = &theme.current_container().component;
iced::widget::container::Appearance {
crate::widget::container::Appearance {
icon_color: Some(container.on.into()),
text_color: Some(container.on.into()),
background: Some(Background::Color(container.base.into())),
border_radius: 8.0.into(),