kivy: pass show_max as parameter
This commit is contained in:
parent
c19c314c0f
commit
6bb6169541
|
@ -731,10 +731,8 @@ class ElectrumWindow(App):
|
||||||
popup.tx_hash = tx_hash
|
popup.tx_hash = tx_hash
|
||||||
popup.open()
|
popup.open()
|
||||||
|
|
||||||
def amount_dialog(self, label, callback):
|
def amount_dialog(self, label, callback, show_max):
|
||||||
popup = Builder.load_file('gui/kivy/uix/ui_screens/amount.kv')
|
popup = Builder.load_file('gui/kivy/uix/ui_screens/amount.kv')
|
||||||
# Hide max_button
|
|
||||||
show_max = False
|
|
||||||
but_max = popup.ids.but_max
|
but_max = popup.ids.but_max
|
||||||
if not show_max:
|
if not show_max:
|
||||||
but_max.disabled = True
|
but_max.disabled = True
|
||||||
|
|
|
@ -52,7 +52,7 @@ ReceiveScreen:
|
||||||
halign: 'left'
|
halign: 'left'
|
||||||
size_hint: 0.5, None
|
size_hint: 0.5, None
|
||||||
height: '38dp'
|
height: '38dp'
|
||||||
on_release: app.amount_dialog(amount, receive_screen.parent.update_qr)
|
on_release: app.amount_dialog(amount, receive_screen.parent.update_qr, False)
|
||||||
background_color: 0, 0, 0, 0
|
background_color: 0, 0, 0, 0
|
||||||
CardSeparator:
|
CardSeparator:
|
||||||
opacity: message_selection.opacity
|
opacity: message_selection.opacity
|
||||||
|
|
|
@ -109,7 +109,7 @@ SendScreen:
|
||||||
halign: 'left'
|
halign: 'left'
|
||||||
size_hint: 0.5, None
|
size_hint: 0.5, None
|
||||||
height: '38dp'
|
height: '38dp'
|
||||||
on_release: app.amount_dialog(self, None)
|
on_release: app.amount_dialog(self, None, True)
|
||||||
background_color: .238, .585, .878, 0
|
background_color: .238, .585, .878, 0
|
||||||
CardSeparator:
|
CardSeparator:
|
||||||
opacity: message_selection.opacity
|
opacity: message_selection.opacity
|
||||||
|
|
Loading…
Reference in New Issue