mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
Seperate style and title variables (#537)
Added lj's thought process from https://github.com/ChrisTitusTech/linutil/pull/490 Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
This commit is contained in:
parent
035aff28eb
commit
176ce1f4b9
|
@ -237,22 +237,16 @@ impl AppState {
|
||||||
Style::new()
|
Style::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create the list widget with items
|
let title = format!(
|
||||||
let list = List::new(items)
|
|
||||||
.highlight_style(if let Focus::List = self.focus {
|
|
||||||
Style::default().reversed()
|
|
||||||
} else {
|
|
||||||
Style::new()
|
|
||||||
})
|
|
||||||
.block(Block::default().borders(Borders::ALL).title(format!(
|
|
||||||
"Linux Toolbox - {} {}",
|
"Linux Toolbox - {} {}",
|
||||||
env!("BUILD_DATE"),
|
env!("BUILD_DATE"),
|
||||||
if self.multi_select {
|
self.multi_select.then(|| "[Multi-Select]").unwrap_or("")
|
||||||
"[Multi-Select]"
|
);
|
||||||
} else {
|
|
||||||
""
|
// Create the list widget with items
|
||||||
}
|
let list = List::new(items)
|
||||||
)))
|
.highlight_style(style)
|
||||||
|
.block(Block::default().borders(Borders::ALL).title(title))
|
||||||
.scroll_padding(1);
|
.scroll_padding(1);
|
||||||
frame.render_stateful_widget(list, chunks[1], &mut self.selection);
|
frame.render_stateful_widget(list, chunks[1], &mut self.selection);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user