mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Update to modalkit{,-ratatui}@0.0.19 (#273)
This commit is contained in:
parent
3971801aa3
commit
46f6d37f76
7 changed files with 316 additions and 89 deletions
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1368,7 +1368,7 @@ impl ListItem<IambInfo> for VerifyItem {
|
|||
]));
|
||||
}
|
||||
|
||||
Text { lines }
|
||||
Text::from(lines)
|
||||
}
|
||||
|
||||
fn get_word(&self) -> Option<String> {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue