One more clean up fix
This commit is contained in:
parent
9e7d2edc0d
commit
47aa6d2e96
@ -242,11 +242,12 @@ impl Ui {
|
||||
})
|
||||
}
|
||||
|
||||
fn block<'a>() -> Block<'a> {
|
||||
fn block<'a>(title: &str) -> Block<'a> {
|
||||
Block::default()
|
||||
.title_alignment(Alignment::Center)
|
||||
.borders(Borders::ALL)
|
||||
.border_type(BorderType::Rounded)
|
||||
.title(format!(" {title} "))
|
||||
}
|
||||
|
||||
fn render_list_widget<B: Backend>(
|
||||
@ -260,7 +261,7 @@ impl Ui {
|
||||
.highlight_style(Self::highlight_style(list.active))
|
||||
.highlight_symbol(">> ")
|
||||
.style(Self::style())
|
||||
.block(Self::block().title(format!(" {title} "))),
|
||||
.block(Self::block(title)),
|
||||
area,
|
||||
&mut list.state,
|
||||
);
|
||||
@ -273,9 +274,7 @@ impl Ui {
|
||||
frame: &mut Frame<'_, B>,
|
||||
) {
|
||||
frame.render_widget(
|
||||
paragraph
|
||||
.style(Self::style())
|
||||
.block(Self::block().title(format!(" {title} "))),
|
||||
paragraph.style(Self::style()).block(Self::block(title)),
|
||||
area,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user