From 6bb616954154d62d24b79083e86f2049d7daed77 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 30 Oct 2015 15:48:17 +0100 Subject: [PATCH] kivy: pass show_max as parameter --- gui/kivy/main_window.py | 4 +--- gui/kivy/uix/ui_screens/receive.kv | 2 +- gui/kivy/uix/ui_screens/send.kv | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py index ad413c2a..ed3a5471 100644 --- a/gui/kivy/main_window.py +++ b/gui/kivy/main_window.py @@ -731,10 +731,8 @@ class ElectrumWindow(App): popup.tx_hash = tx_hash 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') - # Hide max_button - show_max = False but_max = popup.ids.but_max if not show_max: but_max.disabled = True diff --git a/gui/kivy/uix/ui_screens/receive.kv b/gui/kivy/uix/ui_screens/receive.kv index f1e08bf1..753c52d1 100644 --- a/gui/kivy/uix/ui_screens/receive.kv +++ b/gui/kivy/uix/ui_screens/receive.kv @@ -52,7 +52,7 @@ ReceiveScreen: halign: 'left' size_hint: 0.5, None 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 CardSeparator: opacity: message_selection.opacity diff --git a/gui/kivy/uix/ui_screens/send.kv b/gui/kivy/uix/ui_screens/send.kv index 0c16daf4..d850d4f9 100644 --- a/gui/kivy/uix/ui_screens/send.kv +++ b/gui/kivy/uix/ui_screens/send.kv @@ -109,7 +109,7 @@ SendScreen: halign: 'left' size_hint: 0.5, None height: '38dp' - on_release: app.amount_dialog(self, None) + on_release: app.amount_dialog(self, None, True) background_color: .238, .585, .878, 0 CardSeparator: opacity: message_selection.opacity