LBRY-Vault/gui/kivy/ui_screens/screensend.kv
akshayaurora c121c1aa4e reorganize files and bring code inline with current master
Conflicts:
	lib/simple_config.py
2015-09-03 14:20:37 +02:00

187 lines
7.4 KiB
Text

<TextInputSendBlue@TextInput>
padding: '5dp'
size_hint: 1, None
height: '27dp'
pos_hint: {'center_y':.5}
multiline: False
hint_text_color: self.foreground_color
foreground_color: .843, .914, .972, 1
background_color: 1, 1, 1, 1
background_normal: 'atlas://gui/kivy/theming/light/tab_btn'
background_active: 'atlas://gui/kivy/theming/light/textinput_active'
<ScreenSendContent@BoxLayout>
opacity: 0
padding: '12dp', '12dp', '12dp', '12dp'
spacing: '12dp'
orientation: 'vertical'
mode: 'address'
SendReceiveToggle:
SendToggle:
id: toggle_address
text: 'ADDRESS'
group: 'send_type'
state: 'down' if root.mode == 'address' else 'normal'
source: 'atlas://gui/kivy/theming/light/globe'
background_down: 'atlas://gui/kivy/theming/light/btn_send_address'
on_release:
if root.mode == 'address': root.mode = 'fc'
root.mode = 'address'
SendToggle:
id: toggle_nfc
text: 'NFC'
group: 'send_type'
state: 'down' if root.mode == 'nfc' else 'normal'
source: 'atlas://gui/kivy/theming/light/nfc'
background_down: 'atlas://gui/kivy/theming/light/btn_send_nfc'
on_release:
if root.mode == 'nfc': root.mode = 'str'
root.mode = 'nfc'
GridLayout:
id: grid
cols: 1
size_hint: 1, None
height: self.minimum_height
SendReceiveCardTop
id: card_address
BoxLayout
size_hint: 1, None
height: '42dp'
rows: 1
Label
bold: True
color: amount_e.foreground_color
text_size: self.size
valign: 'bottom'
font_size: '22sp'
text: app.base_unit
size_hint_x: .25
ELTextInput:
id: amount_e
input_type: 'number'
multiline: False
bold: True
font_size: '50sp'
foreground_color: .308, .308, .308, 1
background_normal: 'atlas://gui/kivy/theming/light/tab_btn'
pos_hint: {'top': 1.5}
size_hint: .7, None
height: '67dp'
hint_text: 'Amount'
text: '0.0'
on_text_validate: payto_e.focus = True
CardSeparator
BoxLayout:
size_hint: 1, None
height: '42dp'
spacing: '5dp'
Label:
font_size: '12dp'
color: lbl_fee.color
text: app.gui.main_gui.create_quote_text(Decimal(amount_e.text)) if hasattr(app, 'gui') else '0'
text_size: self.size
halign: 'left'
valign: 'middle'
Label:
id: lbl_fee
color: .761, .761, .761, 1
font_size: '12dp'
text: '[b]{}[/b] of fee'.format(fee_e.value)
text_size: self.size
halign: 'right'
valign: 'middle'
IconButton:
id: fee_e
source: 'atlas://gui/kivy/theming/light/contact'
text: str(self.value)
value: .0005
pos_hint: {'center_y': .5}
size_hint: None, None
size: '32dp', '32dp'
on_release: print 'TODO'
SendReceiveBlueBottom:
id: blue_bottom
size_hint: 1, None
height: self.minimum_height
BoxLayout
size_hint: 1, None
height: blue_bottom.item_height
spacing: '5dp'
Image:
source: 'atlas://gui/kivy/theming/light/contact'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
TextInputSendBlue:
id: payto_e
hint_text: "Enter Contact or adress"
on_text_validate:
Factory.Animation(opacity=1,\
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
IconButton:
id: qr
source: 'atlas://gui/kivy/theming/light/qrcode'
pos_hint: {'center_y': .5}
size_hint: None, None
size: '22dp', '22dp'
CardSeparator
opacity: message_selection.opacity
color: blue_bottom.foreground_color
BoxLayout:
id: message_selection
opacity: 1 if app.expert_mode else 0
size_hint: 1, None
height: blue_bottom.item_height if app.expert_mode else 0
spacing: '5dp'
Image:
source: 'atlas://gui/kivy/theming/light/pen'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
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)
#anim.start(address_selection)
CardSeparator
opacity: wallet_selection.opacity
color: blue_bottom.foreground_color
WalletSelector:
id: wallet_selection
foreground_color: blue_bottom.foreground_color
opacity: 1 if app.expert_mode else 0
size_hint: 1, None
height: blue_bottom.item_height if app.expert_mode else 0
CardSeparator
opacity: address_selection.opacity
color: blue_bottom.foreground_color
AddressSelector:
id: address_selection
foreground_color: blue_bottom.foreground_color
opacity: 1 if app.expert_mode else 0
size_hint: 1, None
height: blue_bottom.item_height if app.expert_mode else 0
CreateAccountButtonGreen:
background_color: (1, 1, 1, 1) if self.disabled else ((.258, .80, .388, 1) if self.state == 'normal' else (.203, .490, .741, 1))
text: _('Goto next step') if app.wallet.seed else _('Create unsigned transaction')
size_hint_y: None
height: '38dp'
disabled: True if wallet_selection.opacity == 0 else False
on_release:
message = 'sending {} {} to {}'.format(\
app.base_unit, amount_e.text, payto_e.text)
app.gui.main_gui.do_send(self, message=message)
Widget