From c8273f0b4dc2ae49179ebde8ca22c819568e8a24 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 11 Jul 2023 17:28:45 -0400 Subject: [PATCH] fix(notifications): layout --- cosmic-applet-notifications/src/main.rs | 43 +++++++++++++------------ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/cosmic-applet-notifications/src/main.rs b/cosmic-applet-notifications/src/main.rs index 2eb7bb72..d0548523 100644 --- a/cosmic-applet-notifications/src/main.rs +++ b/cosmic-applet-notifications/src/main.rs @@ -359,31 +359,34 @@ impl Application for Notifications { } None => row![app_name, duration_since], }, - text(if n.summary.len() > 77 { - Cow::from(format!( - "{:.80}...", - n.summary.lines().next().unwrap_or_default() - )) - } else { - Cow::from(&n.summary) - }) - .size(14) - .width(Length::Fixed(300.0)), - text(if n.body.len() > 77 { - Cow::from(format!( - "{:.80}...", - n.body.lines().next().unwrap_or_default() - )) - } else { - Cow::from(&n.body) - }) - .size(12) - .width(Length::Fixed(300.0)), + column![ + text(if n.summary.len() > 77 { + Cow::from(format!( + "{:.80}...", + n.summary.lines().next().unwrap_or_default() + )) + } else { + Cow::from(&n.summary) + }) + .width(Length::Fill) + .size(14), + text(if n.body.len() > 77 { + Cow::from(format!( + "{:.80}...", + n.body.lines().next().unwrap_or_default() + )) + } else { + Cow::from(&n.body) + }) + .width(Length::Fill) + .size(12) + ] ) .spacing(8) .into()]) .padding(16) .on_press(Message::Dismissed(n.id)) + .width(Length::Fill) .into(), ); }