From 748951596251ce46c2f212a45d27e44c632d8cbf Mon Sep 17 00:00:00 2001 From: Maddox Werts Date: Sat, 2 Aug 2025 15:03:29 -0400 Subject: [PATCH] App implements CalcResult for more complex calculations --- project/ui/app.slint | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/project/ui/app.slint b/project/ui/app.slint index e3f19de..28d2a58 100644 --- a/project/ui/app.slint +++ b/project/ui/app.slint @@ -16,8 +16,8 @@ export component Prorater inherits Window { out property last_billing: "NULL"; out property current_membership; out property new_membership; - property calculate_msg: "NULL"; - callback on_calculate() -> string; + property calculation_result; + callback on_calculate() -> CalcResult; VerticalBox { Image { @@ -81,7 +81,7 @@ export component Prorater inherits Window { Button { text: "Calculate"; clicked => { - calculate_msg = on_calculate(); + calculation_result = on_calculate(); calculation.show(); } } @@ -111,7 +111,9 @@ export component Prorater inherits Window { } calculation := Calculation { - message: calculate_msg; + message: calculation_result.message; + start: calculation_result.start; + end: calculation_result.end; x: (root.width - self.width) / 2; y: (root.height - self.height) / 2; }