diff --git a/src/main.rs b/src/main.rs index 6887b59..6dd472b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -542,7 +542,19 @@ impl Application for Glaurung { items: &self.variable, on_add: Message::AddVariable, 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::() + )) + .size(TEXT_EMPH2), ] .max_width(500) .padding(5)