mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +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()
|
||||
};
|
||||
|
||||
let title = format!(
|
||||
"Linux Toolbox - {} {}",
|
||||
env!("BUILD_DATE"),
|
||||
self.multi_select.then(|| "[Multi-Select]").unwrap_or("")
|
||||
);
|
||||
|
||||
// Create the list widget with items
|
||||
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 - {} {}",
|
||||
env!("BUILD_DATE"),
|
||||
if self.multi_select {
|
||||
"[Multi-Select]"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
)))
|
||||
.highlight_style(style)
|
||||
.block(Block::default().borders(Borders::ALL).title(title))
|
||||
.scroll_padding(1);
|
||||
frame.render_stateful_widget(list, chunks[1], &mut self.selection);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user