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