commit d70948f74f1e48ce37cded68a292444516ec2481
parent d25ee6d57645aadb82e646a6ad38429e39405e86
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 14 Oct 2015 18:45:26 +0200
kivy: gui tweaks
Diffstat:
6 files changed, 44 insertions(+), 16 deletions(-)
diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py
@@ -279,10 +279,17 @@ class ReceiveScreen(CScreen):
amount = None if amount == default_text else 100000000 * Decimal(amount)
msg = self.screen.ids.get('message').text
uri = create_URI(address, amount, msg)
- print "z", msg
qr = self.screen.ids.get('qr')
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):
diff --git a/gui/kivy/uix/ui_screens/network.kv b/gui/kivy/uix/ui_screens/network.kv
@@ -25,7 +25,10 @@ Popup:
id: host
Button:
- size_hint_y: None
+ size_hint: 0.5, None
height: '48dp'
text: _('Close')
on_release: nd.dismiss()
+
+ Widget:
+ size_hint: 1, 1
diff --git a/gui/kivy/uix/ui_screens/plugins.kv b/gui/kivy/uix/ui_screens/plugins.kv
@@ -3,14 +3,19 @@ Popup:
id: popup
BoxLayout:
orientation: 'vertical'
+
GridLayout:
- size_hint_y: None
+ size_hint: 1, None
cols: 2
id: plugins_list
on_parent:
app.show_plugins(plugins_list)
Button:
- size_hint_y: None
+ size_hint: 1, None
height: '48dp'
text: _('Close')
on_release: popup.dismiss()
+
+ Widget:
+ size_hint: 1, 0.8
+
diff --git a/gui/kivy/uix/ui_screens/receive.kv b/gui/kivy/uix/ui_screens/receive.kv
@@ -16,6 +16,11 @@ ReceiveScreen:
orientation: 'vertical'
size_hint: 1, 1
+ AddressSelector:
+ id: address
+ size_hint: 1, None
+ height: '38dp'
+
FloatLayout:
id: bl
QRCodeWidget:
@@ -27,18 +32,10 @@ ReceiveScreen:
if self.collide_point(*args[1].pos):\
app.show_info_bubble(icon=self.ids.qrimage.texture, text='texture')
-
SendReceiveBlueBottom:
id: blue_bottom
size_hint: 1, None
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:
size_hint: 1, None
height: blue_bottom.item_height
@@ -74,6 +71,21 @@ ReceiveScreen:
TextInputBlue:
id: message
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:
- size_hint: 1, 0.5
+ size_hint: 1, 0.3
diff --git a/gui/kivy/uix/ui_screens/send.kv b/gui/kivy/uix/ui_screens/send.kv
@@ -127,7 +127,7 @@ SendScreen:
pos_hint: {'center_y': .5}
TextInputBlue:
id: message_e
- hint_text: 'Optional description'
+ hint_text: 'Description (optional)'
BoxLayout:
size_hint: 1, None
height: '38dp'
diff --git a/gui/kivy/uix/ui_screens/settings.kv b/gui/kivy/uix/ui_screens/settings.kv
@@ -8,6 +8,7 @@ Popup:
GridLayout:
cols: 2
+ size_hint: 1, None
Label:
text: _('Base unit')
height: '48dp'
@@ -33,5 +34,5 @@ Popup:
on_release: settings.dismiss()
Widget:
- size_hint: 1, 1
+ size_hint: 1, 0.8