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.
99 lines
2.7 KiB
99 lines
2.7 KiB
#: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, None |
|
height: '48dp' |
|
Label: |
|
id: a |
|
amount: '' |
|
is_fiat: False |
|
text: app.get_amount_text(self.amount, self.is_fiat) |
|
Widget: |
|
size_hint_x: 1 |
|
Button: |
|
id: button_fiat |
|
size_hint: 1, None |
|
height: '48dp' |
|
text: '/' |
|
on_release: a.is_fiat = not a.is_fiat |
|
|
|
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() |
|
|
|
Widget: |
|
size_hint: 1, None |
|
|
|
BoxLayout: |
|
size_hint: 1, None |
|
height: '48dp' |
|
Button: |
|
size_hint: 1, None |
|
height: '48dp' |
|
text: 'Clear' |
|
on_release: a.amount = '' |
|
Widget: |
|
size_hint: 1, None |
|
height: '48dp' |
|
Button: |
|
size_hint: 1, None |
|
height: '48dp' |
|
text: _('OK') |
|
on_release: popup.dismiss()
|
|
|