Skip to content

Commit

Permalink
Update Widgets.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ositoMalvado committed Aug 2, 2024
1 parent 175a4fe commit 1370b25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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()

Expand All @@ -95,6 +98,7 @@ def __init__(self):
)

self.descuento = 15
self.copy_value = 0

self.slider = ft.Slider(
value=self.descuento,
Expand Down

0 comments on commit 1370b25

Please sign in to comment.