Browse Source

Merge branch 'master' of git://github.com/spesmilo/electrum

283
ThomasV 9 years ago
parent
commit
c19c314c0f
  1. 13
      gui/kivy/main_window.py
  2. 2
      gui/kivy/uix/ui_screens/amount.kv

13
gui/kivy/main_window.py

@ -733,6 +733,16 @@ class ElectrumWindow(App):
def amount_dialog(self, label, callback): def amount_dialog(self, label, callback):
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
if not show_max:
but_max.disabled = True
but_max.opacity = 0
else:
but_max.disabled = False
but_max.opacity = 1
if label.text != label.default_text: if label.text != label.default_text:
a, u = label.text.split() a, u = label.text.split()
assert u == self.base_unit assert u == self.base_unit
@ -755,6 +765,3 @@ class ElectrumWindow(App):
popup.open() popup.open()
else: else:
apply(f, args + (None,)) apply(f, args + (None,))

2
gui/kivy/uix/ui_screens/amount.kv

@ -66,6 +66,7 @@ Popup:
text: '<' text: '<'
label: a label: a
Button: Button:
id: but_max
size_hint: 1, None size_hint: 1, None
height: '48dp' height: '48dp'
text: 'Max' text: 'Max'
@ -84,4 +85,3 @@ Popup:
height: '48dp' height: '48dp'
text: _('OK') text: _('OK')
on_release: popup.dismiss() on_release: popup.dismiss()

Loading…
Cancel
Save