mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-03 02:35:20 +00:00
kivy: gui tweaks
This commit is contained in:
parent
d25ee6d576
commit
d70948f74f
6 changed files with 44 additions and 16 deletions
|
@ -279,10 +279,17 @@ class ReceiveScreen(CScreen):
|
||||||
amount = None if amount == default_text else 100000000 * Decimal(amount)
|
amount = None if amount == default_text else 100000000 * Decimal(amount)
|
||||||
msg = self.screen.ids.get('message').text
|
msg = self.screen.ids.get('message').text
|
||||||
uri = create_URI(address, amount, msg)
|
uri = create_URI(address, amount, msg)
|
||||||
print "z", msg
|
|
||||||
qr = self.screen.ids.get('qr')
|
qr = self.screen.ids.get('qr')
|
||||||
qr.set_data(uri)
|
qr.set_data(uri)
|
||||||
|
|
||||||
|
def do_share(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def do_clear(self):
|
||||||
|
a = self.screen.ids.get('amount')
|
||||||
|
a.text = a.default_text
|
||||||
|
self.screen.ids.get('message').text = ''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ContactsScreen(CScreen):
|
class ContactsScreen(CScreen):
|
||||||
|
|
|
@ -25,7 +25,10 @@ Popup:
|
||||||
id: host
|
id: host
|
||||||
|
|
||||||
Button:
|
Button:
|
||||||
size_hint_y: None
|
size_hint: 0.5, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
text: _('Close')
|
text: _('Close')
|
||||||
on_release: nd.dismiss()
|
on_release: nd.dismiss()
|
||||||
|
|
||||||
|
Widget:
|
||||||
|
size_hint: 1, 1
|
||||||
|
|
|
@ -3,14 +3,19 @@ Popup:
|
||||||
id: popup
|
id: popup
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
|
|
||||||
GridLayout:
|
GridLayout:
|
||||||
size_hint_y: None
|
size_hint: 1, None
|
||||||
cols: 2
|
cols: 2
|
||||||
id: plugins_list
|
id: plugins_list
|
||||||
on_parent:
|
on_parent:
|
||||||
app.show_plugins(plugins_list)
|
app.show_plugins(plugins_list)
|
||||||
Button:
|
Button:
|
||||||
size_hint_y: None
|
size_hint: 1, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
text: _('Close')
|
text: _('Close')
|
||||||
on_release: popup.dismiss()
|
on_release: popup.dismiss()
|
||||||
|
|
||||||
|
Widget:
|
||||||
|
size_hint: 1, 0.8
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,11 @@ ReceiveScreen:
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
size_hint: 1, 1
|
size_hint: 1, 1
|
||||||
|
|
||||||
|
AddressSelector:
|
||||||
|
id: address
|
||||||
|
size_hint: 1, None
|
||||||
|
height: '38dp'
|
||||||
|
|
||||||
FloatLayout:
|
FloatLayout:
|
||||||
id: bl
|
id: bl
|
||||||
QRCodeWidget:
|
QRCodeWidget:
|
||||||
|
@ -27,18 +32,10 @@ ReceiveScreen:
|
||||||
if self.collide_point(*args[1].pos):\
|
if self.collide_point(*args[1].pos):\
|
||||||
app.show_info_bubble(icon=self.ids.qrimage.texture, text='texture')
|
app.show_info_bubble(icon=self.ids.qrimage.texture, text='texture')
|
||||||
|
|
||||||
|
|
||||||
SendReceiveBlueBottom:
|
SendReceiveBlueBottom:
|
||||||
id: blue_bottom
|
id: blue_bottom
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
height: self.minimum_height
|
height: self.minimum_height
|
||||||
AddressSelector:
|
|
||||||
id: address
|
|
||||||
size_hint: 0.5, None
|
|
||||||
height: '38dp'
|
|
||||||
CardSeparator:
|
|
||||||
opacity: message_selection.opacity
|
|
||||||
color: blue_bottom.foreground_color
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
height: blue_bottom.item_height
|
height: blue_bottom.item_height
|
||||||
|
@ -74,6 +71,21 @@ ReceiveScreen:
|
||||||
TextInputBlue:
|
TextInputBlue:
|
||||||
id: message
|
id: message
|
||||||
hint_text: 'Description (optional)'
|
hint_text: 'Description (optional)'
|
||||||
on_text_validate: receive_screen.parent.update_qr
|
on_text_validate: receive_screen.parent.update_qr()
|
||||||
|
|
||||||
|
BoxLayout:
|
||||||
|
size_hint: 1, None
|
||||||
|
height: '38dp'
|
||||||
|
Button:
|
||||||
|
text: _('Clear')
|
||||||
|
size_hint: 1, None
|
||||||
|
height: '38dp'
|
||||||
|
on_release: receive_screen.parent.do_clear()
|
||||||
|
Button:
|
||||||
|
text: _('Share')
|
||||||
|
size_hint: 1, None
|
||||||
|
height: '38dp'
|
||||||
|
on_release: receive_screen.parent.do_share()
|
||||||
|
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 0.5
|
size_hint: 1, 0.3
|
||||||
|
|
|
@ -127,7 +127,7 @@ SendScreen:
|
||||||
pos_hint: {'center_y': .5}
|
pos_hint: {'center_y': .5}
|
||||||
TextInputBlue:
|
TextInputBlue:
|
||||||
id: message_e
|
id: message_e
|
||||||
hint_text: 'Optional description'
|
hint_text: 'Description (optional)'
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
height: '38dp'
|
height: '38dp'
|
||||||
|
|
|
@ -8,6 +8,7 @@ Popup:
|
||||||
|
|
||||||
GridLayout:
|
GridLayout:
|
||||||
cols: 2
|
cols: 2
|
||||||
|
size_hint: 1, None
|
||||||
Label:
|
Label:
|
||||||
text: _('Base unit')
|
text: _('Base unit')
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
|
@ -33,5 +34,5 @@ Popup:
|
||||||
on_release: settings.dismiss()
|
on_release: settings.dismiss()
|
||||||
|
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 1
|
size_hint: 1, 0.8
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue