Add alignment to header
This commit is contained in:
parent
a83e680521
commit
f7cd14549e
@ -383,9 +383,10 @@ impl Calculator {
|
|||||||
|
|
||||||
pub fn get_status_line(&self) -> String {
|
pub fn get_status_line(&self) -> String {
|
||||||
format!(
|
format!(
|
||||||
"[{}] [{}] [{}]",
|
"[{}] [{}] [{}] [{}]",
|
||||||
self.display_mode,
|
self.display_mode,
|
||||||
self.angle_mode,
|
self.angle_mode,
|
||||||
|
self.calculator_alignment,
|
||||||
if self.save_on_close { "W" } else { "w" }
|
if self.save_on_close { "W" } else { "w" }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -107,3 +107,12 @@ impl Default for CalculatorAlignment {
|
|||||||
CalculatorAlignment::Left
|
CalculatorAlignment::Left
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for CalculatorAlignment {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match self {
|
||||||
|
CalculatorAlignment::Left => write!(f, "L"),
|
||||||
|
CalculatorAlignment::Right => write!(f, "R"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user