Skip to content

Commit

Permalink
fix(cards): use button::custom
Browse files Browse the repository at this point in the history
  • Loading branch information
git-f0x authored and mmstick committed Sep 19, 2024
1 parent 8fda0ba commit 447ff6d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/widget/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ where
if let Some(source) = show_less_icon {
show_less_children.push(icon(source).size(ICON_SIZE).into());
}
show_less_children
.push(text(show_less_label).size(14).width(Length::Shrink).into());
show_less_children.push(text::body(show_less_label).width(Length::Shrink).into());
show_less_children.push(
icon::from_name("pan-up-symbolic")
.size(ICON_SIZE)
Expand All @@ -122,15 +121,15 @@ where
.width(Length::Shrink);

Element::from(
button(button_content)
button::custom(button_content)
.style(cosmic::theme::Button::Text)
.width(Length::Shrink)
.on_press(on_show_more(off_animation, false))
.padding([PADDING / 2, PADDING]),
)
},
clear_all_button: Element::from(
button(text(clear_all_label).size(14))
button::custom(text::body(clear_all_label))
.style(cosmic::theme::Button::Text)
.width(Length::Shrink)
.on_press(on_clear_all)
Expand All @@ -143,7 +142,7 @@ where
let custom_content = if i == 0 && !expanded && can_show_more {
column::with_capacity(2)
.push(w)
.push(text(show_more_label).size(10))
.push(text::caption(show_more_label))
.spacing(VERTICAL_SPACING)
.align_items(iced_core::Alignment::Center)
.into()
Expand Down

0 comments on commit 447ff6d

Please sign in to comment.