2016-02-04 01:49:51 -08:00
|
|
|
#:import _ electrum_gui.kivy.i18n._
|
2015-10-06 00:59:29 -07:00
|
|
|
#:import Decimal decimal.Decimal
|
|
|
|
#:set btc_symbol unichr(171)
|
|
|
|
#:set mbtc_symbol unichr(187)
|
2016-01-29 02:17:22 -08:00
|
|
|
#:set font_light 'gui/kivy/data/fonts/Roboto-Condensed.ttf'
|
2015-10-06 00:59:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ReceiveScreen:
|
2015-12-04 02:47:46 -08:00
|
|
|
id: s
|
2015-10-06 00:59:29 -07:00
|
|
|
name: 'receive'
|
|
|
|
|
2015-12-04 02:47:46 -08:00
|
|
|
address: ''
|
|
|
|
amount: ''
|
|
|
|
message: ''
|
2016-02-14 03:24:31 -08:00
|
|
|
status: ''
|
2015-12-04 02:47:46 -08:00
|
|
|
|
|
|
|
on_address:
|
2016-02-08 10:01:34 -08:00
|
|
|
self.parent.on_address(self.address)
|
2015-12-04 02:47:46 -08:00
|
|
|
on_amount:
|
2016-02-08 10:01:34 -08:00
|
|
|
self.parent.on_amount_or_message()
|
2015-12-04 02:47:46 -08:00
|
|
|
on_message:
|
2016-02-08 10:01:34 -08:00
|
|
|
self.parent.on_amount_or_message()
|
2015-12-04 02:47:46 -08:00
|
|
|
|
2015-10-06 00:59:29 -07:00
|
|
|
BoxLayout
|
|
|
|
padding: '12dp', '12dp', '12dp', '12dp'
|
|
|
|
spacing: '12dp'
|
|
|
|
orientation: 'vertical'
|
2015-10-14 02:44:01 -07:00
|
|
|
size_hint: 1, 1
|
2015-10-06 05:30:44 -07:00
|
|
|
FloatLayout:
|
|
|
|
id: bl
|
|
|
|
QRCodeWidget:
|
|
|
|
id: qr
|
|
|
|
size_hint: None, 1
|
|
|
|
width: min(self.height, bl.width)
|
|
|
|
pos_hint: {'center': (.5, .5)}
|
2015-10-16 02:51:28 -07:00
|
|
|
shaded: False
|
2016-02-18 03:41:05 -08:00
|
|
|
foreground_color: (0, 0, 0, 0.5) if self.shaded else (0, 0, 0, 0)
|
2015-10-06 05:30:44 -07:00
|
|
|
on_touch_down:
|
2016-02-18 03:41:05 -08:00
|
|
|
touch = args[1]
|
|
|
|
if self.collide_point(*touch.pos): self.shaded = not self.shaded
|
2016-02-14 03:24:31 -08:00
|
|
|
Label:
|
|
|
|
text: root.status
|
|
|
|
opacity: 1 if root.status else 0
|
|
|
|
pos_hint: {'center': (.5, .5)}
|
|
|
|
size_hint: None, 1
|
|
|
|
width: min(self.height, bl.width)
|
|
|
|
bcolor: 0.3, 0.3, 0.3, 0.9
|
|
|
|
canvas.before:
|
|
|
|
Color:
|
|
|
|
rgba: self.bcolor
|
|
|
|
Rectangle:
|
|
|
|
pos: self.pos
|
|
|
|
size: self.size
|
|
|
|
|
2015-10-14 07:52:10 -07:00
|
|
|
SendReceiveBlueBottom:
|
|
|
|
id: blue_bottom
|
|
|
|
size_hint: 1, None
|
|
|
|
height: self.minimum_height
|
|
|
|
BoxLayout:
|
|
|
|
size_hint: 1, None
|
|
|
|
height: blue_bottom.item_height
|
2015-12-14 04:37:19 -08:00
|
|
|
spacing: '5dp'
|
2015-10-14 07:52:10 -07:00
|
|
|
Image:
|
2016-02-25 05:17:59 -08:00
|
|
|
source: 'atlas://gui/kivy/theming/light/globe'
|
2016-02-05 12:07:48 -08:00
|
|
|
size_hint: None, None
|
|
|
|
size: '22dp', '22dp'
|
|
|
|
pos_hint: {'center_y': .5}
|
|
|
|
BlueButton:
|
|
|
|
id: address_label
|
|
|
|
text: s.address if s.address else _('Bitcoin Address')
|
|
|
|
shorten: True
|
2016-02-19 03:01:02 -08:00
|
|
|
disabled: True
|
2016-02-05 12:07:48 -08:00
|
|
|
CardSeparator:
|
|
|
|
opacity: message_selection.opacity
|
|
|
|
color: blue_bottom.foreground_color
|
|
|
|
BoxLayout:
|
|
|
|
size_hint: 1, None
|
|
|
|
height: blue_bottom.item_height
|
|
|
|
spacing: '5dp'
|
|
|
|
Image:
|
2016-02-25 05:17:59 -08:00
|
|
|
source: 'atlas://gui/kivy/theming/light/calculator'
|
|
|
|
opacity: 0.7
|
2015-10-14 07:52:10 -07:00
|
|
|
size_hint: None, None
|
|
|
|
size: '22dp', '22dp'
|
|
|
|
pos_hint: {'center_y': .5}
|
2015-12-14 03:08:11 -08:00
|
|
|
BlueButton:
|
2015-12-04 02:47:46 -08:00
|
|
|
id: amount_label
|
2016-01-25 03:44:30 -08:00
|
|
|
default_text: _('Amount')
|
|
|
|
text: s.amount if s.amount else _('Amount')
|
2016-02-08 10:01:34 -08:00
|
|
|
on_release: Clock.schedule_once(lambda dt: app.amount_dialog(s, False))
|
2015-10-14 07:52:10 -07:00
|
|
|
CardSeparator:
|
|
|
|
opacity: message_selection.opacity
|
|
|
|
color: blue_bottom.foreground_color
|
|
|
|
BoxLayout:
|
|
|
|
id: message_selection
|
|
|
|
opacity: 1
|
|
|
|
size_hint: 1, None
|
|
|
|
height: blue_bottom.item_height
|
|
|
|
spacing: '5dp'
|
|
|
|
Image:
|
|
|
|
source: 'atlas://gui/kivy/theming/light/pen'
|
|
|
|
size_hint: None, None
|
|
|
|
size: '22dp', '22dp'
|
|
|
|
pos_hint: {'center_y': .5}
|
2015-12-14 03:08:11 -08:00
|
|
|
BlueButton:
|
|
|
|
id: description
|
|
|
|
text: s.message if s.message else _('Description')
|
2016-02-08 10:01:34 -08:00
|
|
|
on_release: Clock.schedule_once(lambda dt: app.description_dialog(s))
|
2015-10-14 09:45:26 -07:00
|
|
|
BoxLayout:
|
|
|
|
size_hint: 1, None
|
2015-12-02 06:27:23 -08:00
|
|
|
height: '48dp'
|
2015-10-14 09:45:26 -07:00
|
|
|
Button:
|
2015-12-04 02:47:46 -08:00
|
|
|
text: _('Copy')
|
2015-10-14 09:45:26 -07:00
|
|
|
size_hint: 1, None
|
2015-12-02 06:27:23 -08:00
|
|
|
height: '48dp'
|
2015-12-04 02:47:46 -08:00
|
|
|
on_release: s.parent.do_copy()
|
2016-02-06 07:58:31 -08:00
|
|
|
Button:
|
|
|
|
text: _('Share')
|
|
|
|
size_hint: 1, None
|
|
|
|
height: '48dp'
|
|
|
|
on_release: s.parent.do_share()
|
2015-12-11 06:48:56 -08:00
|
|
|
Button:
|
2015-12-13 06:26:08 -08:00
|
|
|
text: _('New')
|
2015-12-11 06:48:56 -08:00
|
|
|
size_hint: 1, None
|
|
|
|
height: '48dp'
|
2016-02-08 10:01:34 -08:00
|
|
|
on_release: Clock.schedule_once(lambda dt: s.parent.do_new())
|