From 1370b2527208566a6518359ef7696f9107be2feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Perez?= <66093948+ositoMalvado@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:21:34 -0300 Subject: [PATCH] Update Widgets.py --- Widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Widgets.py b/Widgets.py index 5db5984..51d18a2 100644 --- a/Widgets.py +++ b/Widgets.py @@ -47,6 +47,8 @@ def update_premio(self, e): # Asegurarse de que el valor redondeado no sea menor que el valor descontado final_value = max(rounded_value, math.ceil(discounted_value)) + self.copy_value = final_value + print(self.copy_value) self.premio_display.value = "$" + str(int(final_value)) self.premio_display.update() self.valor_final.value = str(int(self.cuotas)) + " cuotas de " + str(int(final_value/self.cuotas)) @@ -72,7 +74,8 @@ def slider_handle(self, e): def copy_premio(self, e): self.copy_sound.play() - self.page.set_clipboard(self.valor_final.value) + + self.page.set_clipboard(str(self.copy_value)) self.sb_copiado.open = True self.page.update() @@ -95,6 +98,7 @@ def __init__(self): ) self.descuento = 15 + self.copy_value = 0 self.slider = ft.Slider( value=self.descuento,