You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
170 lines
5.5 KiB
170 lines
5.5 KiB
#:import _ electrum.gui.kivy.i18n._
|
|
#:import Factory kivy.factory.Factory
|
|
#:import Decimal decimal.Decimal
|
|
#:set btc_symbol chr(171)
|
|
#:set mbtc_symbol chr(187)
|
|
#:set font_light 'electrum/gui/kivy/data/fonts/Roboto-Condensed.ttf'
|
|
|
|
|
|
<RequestLabel@Label>
|
|
#color: .305, .309, .309, 1
|
|
text_size: self.width, None
|
|
halign: 'left'
|
|
valign: 'top'
|
|
|
|
<RequestItem@CardItem>
|
|
address: ''
|
|
memo: ''
|
|
amount: ''
|
|
status: ''
|
|
date: ''
|
|
icon: 'atlas://electrum/gui/kivy/theming/light/important'
|
|
Image:
|
|
id: icon
|
|
source: root.icon
|
|
size_hint: None, 1
|
|
width: self.height *.54
|
|
mipmap: True
|
|
BoxLayout:
|
|
spacing: '8dp'
|
|
height: '32dp'
|
|
orientation: 'vertical'
|
|
Widget
|
|
RequestLabel:
|
|
text: root.address
|
|
shorten: True
|
|
Widget
|
|
RequestLabel:
|
|
text: root.memo
|
|
color: .699, .699, .699, 1
|
|
font_size: '13sp'
|
|
shorten: True
|
|
Widget
|
|
BoxLayout:
|
|
spacing: '8dp'
|
|
height: '32dp'
|
|
orientation: 'vertical'
|
|
Widget
|
|
RequestLabel:
|
|
text: root.amount
|
|
halign: 'right'
|
|
font_size: '15sp'
|
|
Widget
|
|
RequestLabel:
|
|
text: root.status
|
|
halign: 'right'
|
|
font_size: '13sp'
|
|
color: .699, .699, .699, 1
|
|
Widget
|
|
|
|
<RequestRecycleView>:
|
|
viewclass: 'RequestItem'
|
|
RecycleBoxLayout:
|
|
default_size: None, dp(56)
|
|
default_size_hint: 1, None
|
|
size_hint: 1, None
|
|
height: self.minimum_height
|
|
orientation: 'vertical'
|
|
|
|
|
|
ReceiveScreen:
|
|
id: s
|
|
name: 'receive'
|
|
address: ''
|
|
amount: ''
|
|
message: ''
|
|
status: ''
|
|
is_lightning: False
|
|
show_list: True
|
|
|
|
BoxLayout
|
|
padding: '12dp', '12dp', '12dp', '12dp'
|
|
spacing: '12dp'
|
|
orientation: 'vertical'
|
|
|
|
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://electrum/gui/kivy/theming/light/lightning' if root.is_lightning else 'atlas://electrum/gui/kivy/theming/light/globe'
|
|
size_hint: None, None
|
|
size: '22dp', '22dp'
|
|
pos_hint: {'center_y': .5}
|
|
BlueButton:
|
|
id: address_label
|
|
text: _('Lightning') if root.is_lightning else (s.address if s.address else _('Bitcoin Address'))
|
|
shorten: True
|
|
on_release: root.is_lightning = not root.is_lightning
|
|
#on_release: Clock.schedule_once(lambda dt: app.addresses_dialog(s))
|
|
CardSeparator:
|
|
opacity: message_selection.opacity
|
|
color: blue_bottom.foreground_color
|
|
BoxLayout:
|
|
size_hint: 1, None
|
|
height: blue_bottom.item_height
|
|
spacing: '5dp'
|
|
Image:
|
|
source: 'atlas://electrum/gui/kivy/theming/light/calculator'
|
|
opacity: 0.7
|
|
size_hint: None, None
|
|
size: '22dp', '22dp'
|
|
pos_hint: {'center_y': .5}
|
|
BlueButton:
|
|
id: amount_label
|
|
default_text: _('Amount')
|
|
text: s.amount if s.amount else _('Amount')
|
|
on_release: Clock.schedule_once(lambda dt: app.amount_dialog(s, False))
|
|
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://electrum/gui/kivy/theming/light/pen'
|
|
size_hint: None, None
|
|
size: '22dp', '22dp'
|
|
pos_hint: {'center_y': .5}
|
|
BlueButton:
|
|
id: description
|
|
text: s.message if s.message else _('Description')
|
|
on_release: Clock.schedule_once(lambda dt: app.description_dialog(s))
|
|
BoxLayout:
|
|
size_hint: 1, None
|
|
height: '48dp'
|
|
IconButton:
|
|
icon: 'atlas://electrum/gui/kivy/theming/light/list'
|
|
size_hint: 0.5, None
|
|
height: '48dp'
|
|
on_release: root.show_list = not root.show_list
|
|
IconButton:
|
|
icon: 'atlas://electrum/gui/kivy/theming/light/clock1'
|
|
size_hint: 0.5, None
|
|
height: '48dp'
|
|
on_release: Clock.schedule_once(lambda dt: s.expiration_dialog(s))
|
|
Button:
|
|
text: _('Clear')
|
|
size_hint: 1, None
|
|
height: '48dp'
|
|
on_release: Clock.schedule_once(lambda dt: s.parent.clear())
|
|
Button:
|
|
text: _('Request')
|
|
size_hint: 1, None
|
|
height: '48dp'
|
|
on_release: Clock.schedule_once(lambda dt: s.parent.new_request(root.is_lightning))
|
|
Widget:
|
|
size_hint: 1, 0.1
|
|
RequestRecycleView:
|
|
id: requests_container
|
|
scroll_type: ['bars', 'content']
|
|
bar_width: '25dp'
|
|
opacity: 1 if root.show_list else 0
|
|
disabled: not root.show_list
|
|
|