1
0

kivy: move amount dialog

This commit is contained in:
ThomasV
2015-12-14 14:27:39 +01:00
parent c55a253f6d
commit 5e5f3202b1
3 changed files with 31 additions and 1797 deletions

View File

@@ -733,26 +733,17 @@ class ElectrumWindow(App):
def amount_dialog(self, screen, show_max):
popup = Builder.load_file('gui/kivy/uix/ui_screens/amount.kv')
but_max = popup.ids.but_max
if not show_max:
but_max.disabled = True
but_max.opacity = 0
else:
but_max.disabled = False
but_max.opacity = 1
from uix.dialogs.amount_dialog import AmountDialog
amount = screen.amount
if amount:
a, u = str(amount).split()
amount, u = str(amount).split()
assert u == self.base_unit
popup.ids.kb.amount = a
else:
amount = None
def cb():
o = popup.ids.a.btc_text
screen.amount = o
popup.on_dismiss = cb
def cb(amount):
screen.amount = amount
popup = AmountDialog(show_max, amount, cb)
popup.open()
def protected(self, f, args):