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.
157 lines
5.1 KiB
157 lines
5.1 KiB
#:import _ electrum.gui.kivy.i18n._ |
|
#:import KIVY_GUI_PATH electrum.gui.kivy.KIVY_GUI_PATH |
|
#:import pr_color electrum.invoices.pr_color |
|
#:import PR_UNKNOWN electrum.invoices.PR_UNKNOWN |
|
#:import Factory kivy.factory.Factory |
|
#:import Decimal decimal.Decimal |
|
#:set btc_symbol chr(171) |
|
#:set mbtc_symbol chr(187) |
|
#:set font_light f'{KIVY_GUI_PATH}/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_str: '' |
|
status: PR_UNKNOWN |
|
BoxLayout: |
|
spacing: '8dp' |
|
height: '32dp' |
|
orientation: 'vertical' |
|
Widget |
|
RequestLabel: |
|
text: root.memo |
|
shorten: True |
|
Widget |
|
RequestLabel: |
|
text: root.address |
|
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_str |
|
halign: 'right' |
|
font_size: '13sp' |
|
color: pr_color[root.status] |
|
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 |
|
|
|
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: f'atlas://{KIVY_GUI_PATH}/theming/light/lightning' if root.is_lightning else f'atlas://{KIVY_GUI_PATH}/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 if app.wallet.has_lightning() else False |
|
CardSeparator: |
|
opacity: message_selection.opacity |
|
color: blue_bottom.foreground_color |
|
BoxLayout: |
|
size_hint: 1, None |
|
height: blue_bottom.item_height |
|
spacing: '5dp' |
|
Image: |
|
source: f'atlas://{KIVY_GUI_PATH}/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: f'atlas://{KIVY_GUI_PATH}/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: f'atlas://{KIVY_GUI_PATH}/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.clear()) |
|
Button: |
|
text: _('Request') |
|
size_hint: 1, None |
|
height: '48dp' |
|
on_release: Clock.schedule_once(lambda dt: s.new_request(root.is_lightning)) |
|
Widget: |
|
size_hint: 1, 0.1 |
|
RequestRecycleView: |
|
id: requests_container |
|
scroll_type: ['bars', 'content'] |
|
bar_width: '25dp'
|
|
|