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.
67 lines
1.8 KiB
67 lines
1.8 KiB
9 years ago
|
<KButton@Button>:
|
||
|
size_hint: 1, None
|
||
|
height: '38dp'
|
||
|
|
||
|
Popup:
|
||
|
id: popup
|
||
|
title: _('Amount')
|
||
|
|
||
|
BoxLayout:
|
||
|
|
||
|
orientation: 'vertical'
|
||
|
|
||
|
halign: 'center'
|
||
|
|
||
|
Label:
|
||
|
id: amount_label
|
||
|
text: ''
|
||
|
|
||
|
GridLayout:
|
||
|
cols: 3
|
||
|
size_hint: 0.5, 1
|
||
|
KButton:
|
||
|
text: '1'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '2'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '3'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '4'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '5'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '6'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '7'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '8'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '9'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '.'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '0'
|
||
|
on_release: amount_label.text += self.text
|
||
|
KButton:
|
||
|
text: '<'
|
||
|
on_release: amount_label.text = amount_label.text[:-1]
|
||
|
|
||
|
Button:
|
||
|
size_hint: 0.5, None
|
||
|
height: '48dp'
|
||
|
text: _('OK')
|
||
|
on_release: popup.dismiss()
|
||
|
|
||
|
Widget:
|
||
|
size_hint: 1, None
|