fix(notifications): layout

This commit is contained in:
Ashley Wulber 2023-07-11 17:28:45 -04:00 • committed by Ashley Wulber
parent 9cad9ba649
commit c8273f0b4d

View file

@ -359,6 +359,7 @@ impl Application for Notifications {
}
None => row![app_name, duration_since],
},
column![
text(if n.summary.len() > 77 {
Cow::from(format!(
"{:.80}...",
@ -367,8 +368,8 @@ impl Application for Notifications {
} else {
Cow::from(&n.summary)
})
.size(14)
.width(Length::Fixed(300.0)),
.width(Length::Fill)
.size(14),
text(if n.body.len() > 77 {
Cow::from(format!(
"{:.80}...",
@ -377,13 +378,15 @@ impl Application for Notifications {
} else {
Cow::from(&n.body)
})
.width(Length::Fill)
.size(12)
.width(Length::Fixed(300.0)),
]
)
.spacing(8)
.into()])
.padding(16)
.on_press(Message::Dismissed(n.id))
.width(Length::Fill)
.into(),
);
}