From 10f6e9e17eb8e7944027dfc6527a06e2875418a4 Mon Sep 17 00:00:00 2001 From: Maddox Werts Date: Fri, 1 Aug 2025 15:51:18 -0400 Subject: [PATCH] Updated the App to work with the calculate func --- project/ui/app.slint | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/project/ui/app.slint b/project/ui/app.slint index acb11a3..712fec1 100644 --- a/project/ui/app.slint +++ b/project/ui/app.slint @@ -6,9 +6,10 @@ export component Prorater inherits Window { height: 720px; in property <[string]> membership_names: ["Select One..."]; + out property last_billing: "NULL"; out property current_membership; out property new_membership; - callback on_calculate(); + callback on_calculate() -> string; VerticalBox { Image { @@ -72,9 +73,15 @@ export component Prorater inherits Window { Button { text: "Calculate"; clicked => { - on_calculate(); + result_text.text = on_calculate(); } } + + result_text := Text { + text: ""; + font-size: 1.25rem; + horizontal-alignment: center; + } } date_picker := DatePickerPopup { @@ -84,7 +91,8 @@ export component Prorater inherits Window { accepted(date) => { date_picker.close(); - last-billing-date.text = date.month + "/" + date.day + "/" + date.year; + root.last_billing = date.month + "/" + date.day + "/" + date.year; + last_billing_date.text = root.last_billing; } canceled => {