LBRY-Vault/gui/kivy/uix/ui_screens/amount.kv
2015-12-02 19:25:07 +01:00

98 lines
2.7 KiB
Text

#:import Decimal decimal.Decimal
Popup:
id: popup
title: _('Amount')
AnchorLayout:
anchor_x: 'center'
BoxLayout:
orientation: 'vertical'
size_hint: 0.8, 1
BoxLayout:
size_hint: 1, 1
height: '48dp'
Label:
id: a
amount: ''
is_fiat: False
text: app.get_amount_text(self.amount, self.is_fiat)
size_hint: 1, 1
Widget:
size_hint: 1, 1
GridLayout:
size_hint: 1, None
height: '300dp'
cols: 3
KButton:
text: '1'
label: a
KButton:
text: '2'
label: a
KButton:
text: '3'
label: a
KButton:
text: '4'
label: a
KButton:
text: '5'
label: a
KButton:
text: '6'
label: a
KButton:
text: '7'
label: a
KButton:
text: '8'
label: a
KButton:
text: '9'
label: a
KButton:
text: '.'
label: a
KButton:
text: '0'
label: a
KButton:
text: '<'
label: a
Button:
id: but_max
size_hint: 1, None
height: '48dp'
text: 'Max'
on_release: a.amount = app.get_max_amount()
Button:
id: button_fiat
size_hint: 1, None
height: '48dp'
text: '/'
on_release: a.is_fiat = not a.is_fiat
Button:
size_hint: 1, None
height: '48dp'
text: 'Clear'
on_release: a.amount = ''
Widget:
size_hint: 1, None
BoxLayout:
size_hint: 1, None
height: '48dp'
Widget:
size_hint: 2, None
height: '48dp'
Button:
size_hint: 1, None
height: '48dp'
text: _('OK')
on_release: popup.dismiss()