Right align ~ marker as well
This commit is contained in:
parent
d0612095e3
commit
416cc27006
12
src/main.rs
12
src/main.rs
@ -265,7 +265,17 @@ impl App {
|
||||
.saturating_sub(stack.len() as u16)
|
||||
.saturating_sub(2))
|
||||
{
|
||||
stack.insert(0, ListItem::new(Span::raw("~")));
|
||||
stack.insert(
|
||||
0,
|
||||
ListItem::new(Span::raw(match self.calculator.calculator_alignment {
|
||||
CalculatorAlignment::Left => String::from("~"),
|
||||
CalculatorAlignment::Right => format!(
|
||||
"{: >width$}",
|
||||
"~",
|
||||
width = (chunks[1].width as usize).saturating_sub(2)
|
||||
),
|
||||
})),
|
||||
);
|
||||
}
|
||||
|
||||
let stack = List::new(stack).block(Block::default().borders(Borders::ALL).title("Stack"));
|
||||
|
Loading…
Reference in New Issue
Block a user