Skip to content

Commit c8273f0

Browse files
committed
fix(notifications): layout
1 parent 9cad9ba commit c8273f0

File tree

1 file changed

+23
-20
lines changed
  • cosmic-applet-notifications/src

1 file changed

+23
-20
lines changed

cosmic-applet-notifications/src/main.rs

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -359,31 +359,34 @@ impl Application for Notifications {
359359
}
360360
None => row![app_name, duration_since],
361361
},
362-
text(if n.summary.len() > 77 {
363-
Cow::from(format!(
364-
"{:.80}...",
365-
n.summary.lines().next().unwrap_or_default()
366-
))
367-
} else {
368-
Cow::from(&n.summary)
369-
})
370-
.size(14)
371-
.width(Length::Fixed(300.0)),
372-
text(if n.body.len() > 77 {
373-
Cow::from(format!(
374-
"{:.80}...",
375-
n.body.lines().next().unwrap_or_default()
376-
))
377-
} else {
378-
Cow::from(&n.body)
379-
})
380-
.size(12)
381-
.width(Length::Fixed(300.0)),
362+
column![
363+
text(if n.summary.len() > 77 {
364+
Cow::from(format!(
365+
"{:.80}...",
366+
n.summary.lines().next().unwrap_or_default()
367+
))
368+
} else {
369+
Cow::from(&n.summary)
370+
})
371+
.width(Length::Fill)
372+
.size(14),
373+
text(if n.body.len() > 77 {
374+
Cow::from(format!(
375+
"{:.80}...",
376+
n.body.lines().next().unwrap_or_default()
377+
))
378+
} else {
379+
Cow::from(&n.body)
380+
})
381+
.width(Length::Fill)
382+
.size(12)
383+
]
382384
)
383385
.spacing(8)
384386
.into()])
385387
.padding(16)
386388
.on_press(Message::Dismissed(n.id))
389+
.width(Length::Fill)
387390
.into(),
388391
);
389392
}

0 commit comments

Comments
 (0)