Introduce support for Font attributes

This commit is contained in:
Héctor Ramón Jiménez 2023-03-30 00:56:00 +02:00
parent 472fbdf187
commit 707de9d788
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
15 changed files with 129 additions and 44 deletions

View file

@ -392,10 +392,14 @@ impl Task {
row![
text_input,
button(row![delete_icon(), "Delete"].spacing(10))
.on_press(TaskMessage::Delete)
.padding(10)
.style(theme::Button::Destructive)
button(
row![delete_icon(), "Delete"]
.spacing(10)
.align_items(Alignment::Center)
)
.on_press(TaskMessage::Delete)
.padding(10)
.style(theme::Button::Destructive)
]
.spacing(20)
.align_items(Alignment::Center)
@ -487,14 +491,13 @@ fn empty_message(message: &str) -> Element<'_, Message> {
}
// Fonts
const ICONS: Font = Font::Name("Iced-Todos-Icons");
const ICONS: Font = Font::with_name("Iced-Todos-Icons");
fn icon(unicode: char) -> Text<'static> {
text(unicode.to_string())
.font(ICONS)
.width(20)
.horizontal_alignment(alignment::Horizontal::Center)
.size(20)
}
fn edit_icon() -> Text<'static> {