kivy fixes
This commit is contained in:
parent
74c9a05757
commit
54897c84f8
|
@ -44,7 +44,6 @@
|
|||
# Custom Global Widgets
|
||||
|
||||
<TopLabel@Label>
|
||||
valign: 'top'
|
||||
size_hint_y: None
|
||||
text_size: self.width, None
|
||||
height: self.texture_size[1]
|
||||
|
@ -80,8 +79,8 @@
|
|||
#########################
|
||||
|
||||
<OutputList>
|
||||
size_hint: 1, None
|
||||
height: self.minimum_height
|
||||
size_hint_y: None
|
||||
cols: 2
|
||||
spacing: '10dp'
|
||||
padding: '10dp'
|
||||
|
|
|
@ -297,6 +297,7 @@ class ElectrumWindow(App):
|
|||
if txid:
|
||||
popup.ids.txid_label.text = _("Transaction ID") + ':\n' + ' '.join(map(''.join, zip(*[iter(txid)]*4)))
|
||||
popup.open()
|
||||
popup.ids.output_list.update(req.get('outputs', []))
|
||||
|
||||
def qr_dialog(self, title, data):
|
||||
from uix.dialogs.qr_dialog import QRDialog
|
||||
|
|
|
@ -197,6 +197,11 @@ class OutputList(Factory.GridLayout):
|
|||
super(Factory.GridLayout, self).__init__(**kwargs)
|
||||
self.app = App.get_running_app()
|
||||
|
||||
def update(self, outputs):
|
||||
self.clear_widgets()
|
||||
for (type, address, amount) in outputs:
|
||||
self.add_output(address, amount)
|
||||
|
||||
def add_output(self, address, amount):
|
||||
t = Factory.CardLabel(text = '[ref=%s]%s[/ref]'%(address,address), font_size = '6pt')
|
||||
t.shorten = True
|
||||
|
|
|
@ -23,13 +23,15 @@ Builder.load_string('''
|
|||
description: ''
|
||||
outputs_str: ''
|
||||
ScrollView:
|
||||
BoxLayout:
|
||||
orientation: 'vertical'
|
||||
GridLayout:
|
||||
height: self.minimum_height
|
||||
size_hint_y: None
|
||||
cols: 1
|
||||
spacing: '10dp'
|
||||
padding: '10dp'
|
||||
GridLayout:
|
||||
size_hint: 1, None
|
||||
height: self.minimum_height
|
||||
size_hint_y: None
|
||||
cols: 2
|
||||
spacing: '10dp'
|
||||
TopLabel:
|
||||
|
@ -55,7 +57,9 @@ Builder.load_string('''
|
|||
TopLabel:
|
||||
text: _('Outputs') + ':'
|
||||
OutputList:
|
||||
id: outputs
|
||||
height: self.minimum_height
|
||||
size_hint: 1, None
|
||||
id: output_list
|
||||
TopLabel:
|
||||
text: _('Transaction ID') + ':' if root.tx_hash else ''
|
||||
TopLabel:
|
||||
|
@ -71,8 +75,8 @@ Builder.load_string('''
|
|||
Rectangle:
|
||||
size: self.size
|
||||
pos: self.pos
|
||||
Widget:
|
||||
size_hint: 1, 0.2
|
||||
#Widget:
|
||||
# size_hint: 1, 0.2
|
||||
|
||||
BoxLayout:
|
||||
size_hint: 1, None
|
||||
|
@ -106,6 +110,8 @@ class TxDialog(Factory.Popup):
|
|||
self.app = app
|
||||
self.wallet = self.app.wallet
|
||||
self.tx = tx
|
||||
|
||||
def on_open(self):
|
||||
self.update()
|
||||
|
||||
def update(self):
|
||||
|
@ -142,10 +148,7 @@ class TxDialog(Factory.Popup):
|
|||
self.amount_str = _("Transaction unrelated to your wallet")
|
||||
self.fee_str = ''
|
||||
self.can_sign = self.wallet.can_sign(self.tx)
|
||||
|
||||
self.ids.outputs.clear_widgets()
|
||||
for (type, address, amount) in self.tx.outputs():
|
||||
self.ids.outputs.add_output(address, amount)
|
||||
self.ids.output_list.update(self.tx.outputs())
|
||||
|
||||
def do_sign(self):
|
||||
self.app.protected(_("Enter your PIN code in order to sign this transaction"), self._do_sign, ())
|
||||
|
|
|
@ -17,6 +17,7 @@ Popup:
|
|||
GridLayout:
|
||||
spacing: '10dp'
|
||||
padding: '10dp'
|
||||
height: self.minimum_height
|
||||
cols: 2
|
||||
TopLabel:
|
||||
text: _('Requestor') if popup.is_invoice else _('Address')
|
||||
|
@ -43,6 +44,8 @@ Popup:
|
|||
TopLabel:
|
||||
text: root.status
|
||||
|
||||
OutputList:
|
||||
id: output_list
|
||||
TopLabel:
|
||||
id: txid_label
|
||||
Widget:
|
||||
|
|
Loading…
Reference in New Issue