kivy: improve send tab

This commit is contained in:
ThomasV 2015-10-14 15:13:47 +02:00
parent c478122cb1
commit 3f473e6915
5 changed files with 30 additions and 29 deletions

View File

@ -183,8 +183,6 @@
source: 'atlas://gui/kivy/theming/light/card_bottom'
size: self.size
pos: self.pos
Color:
rgba: 1, 1, 1, 1
item_height: dp(42)
foreground_color: .843, .914, .972, 1

View File

@ -792,9 +792,11 @@ class ElectrumWindow(App):
def amount_dialog(self, label, callback):
popup = Builder.load_file('gui/kivy/uix/ui_screens/amount.kv')
popup.ids.amount_label.text = label.text
if label.text != 'Amount':
popup.ids.amount_label.text = label.text
def cb():
label.text = popup.ids.amount_label.text
o = popup.ids.amount_label.text
label.text = o if o else 'Amount'
if callback:
callback()
popup.on_dismiss = cb

View File

@ -205,7 +205,8 @@ class SendScreen(CScreen):
def do_clear(self):
cts = self.ids
cts.payto_e.text = cts.message_e.text = cts.amount_e.text = ''
cts.payto_e.text = cts.message_e.text = ''
cts.amount_e.text = 'Amount'
#self.set_frozen(content, False)
#self.update_status()

View File

@ -56,11 +56,18 @@ Popup:
text: '<'
on_release: amount_label.text = amount_label.text[:-1]
Button:
BoxLayout:
size_hint: 0.5, None
height: '48dp'
text: _('OK')
on_release: popup.dismiss()
Button:
size_hint: 0.5, None
height: '48dp'
text: _('Max')
on_release: popup.dismiss()
Button:
size_hint: 0.5, None
height: '48dp'
text: _('OK')
on_release: popup.dismiss()
Widget:
size_hint: 1, None

View File

@ -71,7 +71,7 @@ SendScreen:
SendReceiveToggle:
SendToggle:
id: qr
text: 'Scan QR Code'
text: 'QR Code'
group: 'send_type'
source: 'atlas://gui/kivy/theming/light/qrcode'
on_release:
@ -98,17 +98,19 @@ SendScreen:
BoxLayout
size_hint: 1, None
height: blue_bottom.item_height
Label:
id: lbl_symbl
Image:
source: 'atlas://gui/kivy/theming/light/bit_logo'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
Button:
id: amount_e
text: 'Amount'
size_hint: 0.5, None
height: '38dp'
Button:
id: amount_e
text: ''
size_hint: 0.5, None
height: '38dp'
on_release: app.amount_dialog(amount_e, None)
background_color: .238, .585, .878, 0
CardSeparator
opacity: message_selection.opacity
color: blue_bottom.foreground_color
@ -129,15 +131,6 @@ SendScreen:
height=blue_bottom.item_height)\
.start(message_selection)
message_e.focus = True
Widget:
size_hint: None, None
width: dp(2)
height: qr.height
pos_hint: {'center_y':.5}
canvas.after:
Rectangle:
size: self.size
pos: self.pos
CardSeparator
opacity: message_selection.opacity
color: blue_bottom.foreground_color
@ -155,9 +148,9 @@ SendScreen:
TextInputSendBlue:
id: message_e
hint_text: 'Enter description here'
on_text_validate:
anim = Factory.Animation(opacity=1, height=blue_bottom.item_height)
anim.start(wallet_selection)
#on_text_validate:
# anim = Factory.Animation(opacity=1, height=blue_bottom.item_height)
# anim.start(wallet_selection)
BoxLayout:
Button: