Update to modalkit{,-ratatui}@0.0.19 (#273)

This commit is contained in:
Ulyssa 2024-04-23 23:30:01 -07:00 committed by GitHub
parent 3971801aa3
commit 46f6d37f76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 316 additions and 89 deletions

View file

@ -936,7 +936,7 @@ impl Message {
let style = self.get_render_style(selected, settings);
let mut fmt = self.get_render_format(prev, width, info, settings);
let mut text = Text { lines: vec![] };
let mut text = Text::default();
let width = fmt.width();
// Show the message that this one replied to, if any.

View file

@ -128,9 +128,7 @@ pub fn space_text(width: usize, style: Style) -> Text<'static> {
pub fn join_cell_text<'a>(texts: Vec<(Text<'a>, usize)>, join: Span<'a>, style: Style) -> Text<'a> {
let height = texts.iter().map(|t| t.0.height()).max().unwrap_or(0);
let mut text = Text {
lines: vec![Line::from(vec![join.clone()]); height],
};
let mut text = Text::from(vec![Line::from(vec![join.clone()]); height]);
for (mut t, w) in texts.into_iter() {
for i in 0..height {

View file

@ -1368,7 +1368,7 @@ impl ListItem<IambInfo> for VerifyItem {
]));
}
Text { lines }
Text::from(lines)
}
fn get_word(&self) -> Option<String> {

View file

@ -148,7 +148,7 @@ impl RoomState {
let l2 = Line::from(
"You can run `:invite accept` or `:invite reject` to accept or reject this invitation.",
);
let text = Text { lines: vec![l1, l2] };
let text = Text::from(vec![l1, l2]);
Paragraph::new(text).alignment(Alignment::Center).render(area, buf);

View file

@ -148,7 +148,7 @@ impl<'a> StatefulWidget for Space<'a> {
Span::styled(e.to_string(), Style::default().fg(Color::Red)).into(),
];
empty_message = Text { lines }.into();
empty_message = Text::from(lines).into();
},
}
}