Total spendings
This commit is contained in:
parent
9e849349d4
commit
c2bb26b8d5
1 changed files with 13 additions and 1 deletions
14
src/main.rs
14
src/main.rs
|
|
@ -542,7 +542,19 @@ impl Application for Glaurung {
|
||||||
items: &self.variable,
|
items: &self.variable,
|
||||||
on_add: Message::AddVariable,
|
on_add: Message::AddVariable,
|
||||||
on_expr_edit: Message::EditVariable,
|
on_expr_edit: Message::EditVariable,
|
||||||
})
|
}),
|
||||||
|
horizontal_rule(SECTION_RULE).style(|theme: &Theme| {
|
||||||
|
let def = rule::StyleSheet::appearance(theme, &theme::Rule::Default);
|
||||||
|
rule::Appearance { width: 3, ..def }
|
||||||
|
}),
|
||||||
|
text(&format!(
|
||||||
|
"Total spendings: {} €",
|
||||||
|
self.recurring
|
||||||
|
.values()
|
||||||
|
.chain(self.variable.values().flat_map(|(_, f)| f))
|
||||||
|
.sum::<f64>()
|
||||||
|
))
|
||||||
|
.size(TEXT_EMPH2),
|
||||||
]
|
]
|
||||||
.max_width(500)
|
.max_width(500)
|
||||||
.padding(5)
|
.padding(5)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue