kivy: improve send tab
This commit is contained in:
@@ -183,8 +183,6 @@
|
|||||||
source: 'atlas://gui/kivy/theming/light/card_bottom'
|
source: 'atlas://gui/kivy/theming/light/card_bottom'
|
||||||
size: self.size
|
size: self.size
|
||||||
pos: self.pos
|
pos: self.pos
|
||||||
Color:
|
|
||||||
rgba: 1, 1, 1, 1
|
|
||||||
|
|
||||||
item_height: dp(42)
|
item_height: dp(42)
|
||||||
foreground_color: .843, .914, .972, 1
|
foreground_color: .843, .914, .972, 1
|
||||||
|
|||||||
@@ -792,9 +792,11 @@ 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')
|
||||||
popup.ids.amount_label.text = label.text
|
if label.text != 'Amount':
|
||||||
|
popup.ids.amount_label.text = label.text
|
||||||
def cb():
|
def cb():
|
||||||
label.text = popup.ids.amount_label.text
|
o = popup.ids.amount_label.text
|
||||||
|
label.text = o if o else 'Amount'
|
||||||
if callback:
|
if callback:
|
||||||
callback()
|
callback()
|
||||||
popup.on_dismiss = cb
|
popup.on_dismiss = cb
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ class SendScreen(CScreen):
|
|||||||
|
|
||||||
def do_clear(self):
|
def do_clear(self):
|
||||||
cts = self.ids
|
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.set_frozen(content, False)
|
||||||
#self.update_status()
|
#self.update_status()
|
||||||
|
|
||||||
|
|||||||
@@ -56,11 +56,18 @@ Popup:
|
|||||||
text: '<'
|
text: '<'
|
||||||
on_release: amount_label.text = amount_label.text[:-1]
|
on_release: amount_label.text = amount_label.text[:-1]
|
||||||
|
|
||||||
Button:
|
BoxLayout:
|
||||||
size_hint: 0.5, None
|
size_hint: 0.5, None
|
||||||
height: '48dp'
|
Button:
|
||||||
text: _('OK')
|
size_hint: 0.5, None
|
||||||
on_release: popup.dismiss()
|
height: '48dp'
|
||||||
|
text: _('Max')
|
||||||
|
on_release: popup.dismiss()
|
||||||
|
Button:
|
||||||
|
size_hint: 0.5, None
|
||||||
|
height: '48dp'
|
||||||
|
text: _('OK')
|
||||||
|
on_release: popup.dismiss()
|
||||||
|
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ SendScreen:
|
|||||||
SendReceiveToggle:
|
SendReceiveToggle:
|
||||||
SendToggle:
|
SendToggle:
|
||||||
id: qr
|
id: qr
|
||||||
text: 'Scan QR Code'
|
text: 'QR Code'
|
||||||
group: 'send_type'
|
group: 'send_type'
|
||||||
source: 'atlas://gui/kivy/theming/light/qrcode'
|
source: 'atlas://gui/kivy/theming/light/qrcode'
|
||||||
on_release:
|
on_release:
|
||||||
@@ -98,17 +98,19 @@ SendScreen:
|
|||||||
BoxLayout
|
BoxLayout
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
height: blue_bottom.item_height
|
height: blue_bottom.item_height
|
||||||
Label:
|
Image:
|
||||||
id: lbl_symbl
|
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'
|
text: 'Amount'
|
||||||
size_hint: 0.5, None
|
size_hint: 0.5, None
|
||||||
height: '38dp'
|
height: '38dp'
|
||||||
Button:
|
|
||||||
id: amount_e
|
|
||||||
text: ''
|
|
||||||
size_hint: 0.5, None
|
|
||||||
height: '38dp'
|
|
||||||
on_release: app.amount_dialog(amount_e, None)
|
on_release: app.amount_dialog(amount_e, None)
|
||||||
|
background_color: .238, .585, .878, 0
|
||||||
|
|
||||||
CardSeparator
|
CardSeparator
|
||||||
opacity: message_selection.opacity
|
opacity: message_selection.opacity
|
||||||
color: blue_bottom.foreground_color
|
color: blue_bottom.foreground_color
|
||||||
@@ -129,15 +131,6 @@ SendScreen:
|
|||||||
height=blue_bottom.item_height)\
|
height=blue_bottom.item_height)\
|
||||||
.start(message_selection)
|
.start(message_selection)
|
||||||
message_e.focus = True
|
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
|
CardSeparator
|
||||||
opacity: message_selection.opacity
|
opacity: message_selection.opacity
|
||||||
color: blue_bottom.foreground_color
|
color: blue_bottom.foreground_color
|
||||||
@@ -155,9 +148,9 @@ SendScreen:
|
|||||||
TextInputSendBlue:
|
TextInputSendBlue:
|
||||||
id: message_e
|
id: message_e
|
||||||
hint_text: 'Enter description here'
|
hint_text: 'Enter description here'
|
||||||
on_text_validate:
|
#on_text_validate:
|
||||||
anim = Factory.Animation(opacity=1, height=blue_bottom.item_height)
|
# anim = Factory.Animation(opacity=1, height=blue_bottom.item_height)
|
||||||
anim.start(wallet_selection)
|
# anim.start(wallet_selection)
|
||||||
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
Button:
|
Button:
|
||||||
|
|||||||
Reference in New Issue
Block a user