kivy: gui fixes
This commit is contained in:
@@ -208,6 +208,18 @@
|
|||||||
values: [] #app.wallet.addresses() if app.wallet else []
|
values: [] #app.wallet.addresses() if app.wallet else []
|
||||||
text: _("Select Your address")
|
text: _("Select Your address")
|
||||||
|
|
||||||
|
<TextInputBlue@TextInput>
|
||||||
|
padding: '5dp'
|
||||||
|
size_hint: 1, None
|
||||||
|
height: '27dp'
|
||||||
|
pos_hint: {'center_y':.5}
|
||||||
|
multiline: False
|
||||||
|
hint_text_color: self.foreground_color
|
||||||
|
foreground_color: .843, .914, .972, 1
|
||||||
|
background_color: 1, 1, 1, 1
|
||||||
|
background_normal: 'atlas://gui/kivy/theming/light/tab_btn'
|
||||||
|
background_active: 'atlas://gui/kivy/theming/light/textinput_active'
|
||||||
|
|
||||||
|
|
||||||
#<ElectrumScreen>
|
#<ElectrumScreen>
|
||||||
# ScrollView:
|
# ScrollView:
|
||||||
|
|||||||
@@ -272,12 +272,15 @@ class ReceiveScreen(CScreen):
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
def update_qr(self):
|
def update_qr(self):
|
||||||
address_label = self.screen.ids.get('address')
|
from electrum.util import create_URI
|
||||||
address = address_label.text
|
address = self.screen.ids.get('address').text
|
||||||
amount_label = self.screen.ids.get('amount')
|
amount = self.screen.ids.get('amount').text
|
||||||
amount = amount_label.text
|
default_text = self.screen.ids.get('amount').default_text
|
||||||
|
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 = self.screen.ids.get('qr')
|
||||||
uri = 'bitcoin:'+ address + '?amount='+amount if address and amount else address
|
|
||||||
qr.set_data(uri)
|
qr.set_data(uri)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,9 @@ ReceiveScreen:
|
|||||||
size_hint: None, None
|
size_hint: None, None
|
||||||
size: '22dp', '22dp'
|
size: '22dp', '22dp'
|
||||||
pos_hint: {'center_y': .5}
|
pos_hint: {'center_y': .5}
|
||||||
TextInputSendBlue:
|
TextInputBlue:
|
||||||
id: message_e
|
id: message
|
||||||
hint_text: 'Description (optional)'
|
hint_text: 'Description (optional)'
|
||||||
|
on_text_validate: receive_screen.parent.update_qr
|
||||||
|
Widget:
|
||||||
|
size_hint: 1, 0.5
|
||||||
|
|||||||
@@ -6,17 +6,6 @@
|
|||||||
#:set mbtc_symbol unichr(187)
|
#:set mbtc_symbol unichr(187)
|
||||||
#:set font_light 'data/fonts/Roboto-Condensed.ttf'
|
#:set font_light 'data/fonts/Roboto-Condensed.ttf'
|
||||||
|
|
||||||
<TextInputSendBlue@TextInput>
|
|
||||||
padding: '5dp'
|
|
||||||
size_hint: 1, None
|
|
||||||
height: '27dp'
|
|
||||||
pos_hint: {'center_y':.5}
|
|
||||||
multiline: False
|
|
||||||
hint_text_color: self.foreground_color
|
|
||||||
foreground_color: .843, .914, .972, 1
|
|
||||||
background_color: 1, 1, 1, 1
|
|
||||||
background_normal: 'atlas://gui/kivy/theming/light/tab_btn'
|
|
||||||
background_active: 'atlas://gui/kivy/theming/light/textinput_active'
|
|
||||||
|
|
||||||
<SendToggle@ToggleButton>
|
<SendToggle@ToggleButton>
|
||||||
source: ''
|
source: ''
|
||||||
@@ -56,7 +45,6 @@
|
|||||||
SendScreen:
|
SendScreen:
|
||||||
|
|
||||||
id: send_screen
|
id: send_screen
|
||||||
mode: 'address'
|
|
||||||
name: 'send'
|
name: 'send'
|
||||||
#action_view: Factory.SendActionView()
|
#action_view: Factory.SendActionView()
|
||||||
#on_deactivate:
|
#on_deactivate:
|
||||||
@@ -67,8 +55,8 @@ SendScreen:
|
|||||||
padding: '12dp', '12dp', '12dp', '12dp'
|
padding: '12dp', '12dp', '12dp', '12dp'
|
||||||
spacing: '12dp'
|
spacing: '12dp'
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
mode: 'address'
|
|
||||||
SendReceiveToggle:
|
SendReceiveToggle:
|
||||||
|
size_hint: 1, None
|
||||||
SendToggle:
|
SendToggle:
|
||||||
id: qr
|
id: qr
|
||||||
text: 'QR Code'
|
text: 'QR Code'
|
||||||
@@ -99,7 +87,7 @@ SendScreen:
|
|||||||
size_hint: None, None
|
size_hint: None, None
|
||||||
size: '22dp', '22dp'
|
size: '22dp', '22dp'
|
||||||
pos_hint: {'center_y': .5}
|
pos_hint: {'center_y': .5}
|
||||||
TextInputSendBlue:
|
TextInputBlue:
|
||||||
id: payto_e
|
id: payto_e
|
||||||
hint_text: "Recipient"
|
hint_text: "Recipient"
|
||||||
CardSeparator:
|
CardSeparator:
|
||||||
@@ -115,12 +103,13 @@ SendScreen:
|
|||||||
pos_hint: {'center_y': .5}
|
pos_hint: {'center_y': .5}
|
||||||
Button:
|
Button:
|
||||||
id: amount_e
|
id: amount_e
|
||||||
text: 'Amount'
|
default_text: 'Amount'
|
||||||
text_size: (amount_e.width-15, None)
|
text: self.default_text
|
||||||
|
text_size: (self.width-15, None)
|
||||||
halign: 'left'
|
halign: 'left'
|
||||||
size_hint: 0.5, None
|
size_hint: 0.5, None
|
||||||
height: '38dp'
|
height: '38dp'
|
||||||
on_release: app.amount_dialog(amount_e, None)
|
on_release: app.amount_dialog(self, None)
|
||||||
background_color: .238, .585, .878, 0
|
background_color: .238, .585, .878, 0
|
||||||
CardSeparator:
|
CardSeparator:
|
||||||
opacity: message_selection.opacity
|
opacity: message_selection.opacity
|
||||||
@@ -136,22 +125,23 @@ SendScreen:
|
|||||||
size_hint: None, None
|
size_hint: None, None
|
||||||
size: '22dp', '22dp'
|
size: '22dp', '22dp'
|
||||||
pos_hint: {'center_y': .5}
|
pos_hint: {'center_y': .5}
|
||||||
TextInputSendBlue:
|
TextInputBlue:
|
||||||
id: message_e
|
id: message_e
|
||||||
hint_text: 'Optional description'
|
hint_text: 'Optional description'
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
height: '38dp'
|
||||||
Button:
|
Button:
|
||||||
text: _('Clear')
|
text: _('Clear')
|
||||||
size_hint_y: None
|
size_hint: 1, None
|
||||||
height: '38dp'
|
height: '38dp'
|
||||||
on_release: send_screen.do_clear()
|
on_release: send_screen.do_clear()
|
||||||
Button:
|
Button:
|
||||||
text: _('Send')
|
text: _('Send')
|
||||||
size_hint_y: None
|
size_hint: 1, None
|
||||||
height: '38dp'
|
height: '38dp'
|
||||||
on_release: send_screen.do_send()
|
on_release: send_screen.do_send()
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, None
|
size_hint: 1, 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user