use BoxLabel for invoice dialog too

This commit is contained in:
ThomasV 2016-02-18 05:35:01 +01:00
parent 70fbebe8a1
commit fa17a2b869
3 changed files with 31 additions and 36 deletions

View File

@ -77,6 +77,17 @@
######################### #########################
# Dialogs # Dialogs
######################### #########################
<BoxLabel@BoxLayout>
text: ''
value: ''
size_hint_y: None
height: max(lbl1.height, lbl2.height)
TopLabel
id: lbl1
text: root.text
TopLabel
id: lbl2
text: root.value
<OutputList> <OutputList>
height: self.minimum_height height: self.minimum_height

View File

@ -9,17 +9,6 @@ from electrum_gui.kivy.i18n import _
from datetime import datetime from datetime import datetime
Builder.load_string(''' Builder.load_string('''
<BoxLabel@BoxLayout>
text: ''
value: ''
size_hint_y: None
height: max(lbl1.height, lbl2.height)
TopLabel
id: lbl1
text: root.text
TopLabel
id: lbl2
text: root.value
<TxDialog> <TxDialog>
id: popup id: popup

View File

@ -20,36 +20,31 @@ Popup:
cols: 1 cols: 1
height: self.minimum_height height: self.minimum_height
size_hint_y: None size_hint_y: None
padding: '10dp'
spacing: '10dp'
GridLayout: GridLayout:
cols: 2 cols: 1
size_hint_y: None size_hint_y: None
height: self.minimum_height height: self.minimum_height
spacing: '10dp' spacing: '10dp'
padding: '10dp' BoxLabel:
TopLabel:
text: _('Requestor') if popup.is_invoice else _('Address')
TopLabel:
text: root.requestor
TopLabel:
text: _('Amount') if root.amount else ''
TopLabel:
text: app.format_amount_and_units(root.amount) if root.amount else ''
TopLabel:
text: _('Signature') if root.signature else ''
TopLabel:
text: root.signature
TopLabel:
text: _('Expiration') if root.exp else ''
TopLabel:
text: root.exp
TopLabel:
text: _('Description') if root.description else ''
TopLabel:
text: root.description
TopLabel:
text: (_('Status') if popup.amount or popup.is_invoice else _('Amount received')) if root.status else '' text: (_('Status') if popup.amount or popup.is_invoice else _('Amount received')) if root.status else ''
TopLabel: value: root.status
text: root.status BoxLabel:
text: _('Amount') if root.amount else ''
value: app.format_amount_and_units(root.amount) if root.amount else ''
BoxLabel:
text: _('Requestor') if popup.is_invoice else _('Address')
value: root.requestor
BoxLabel:
text: _('Signature') if root.signature else ''
value: root.signature
BoxLabel:
text: _('Expiration') if root.exp else ''
value: root.exp
BoxLabel:
text: _('Description') if root.description else ''
value: root.description
TopLabel: TopLabel:
text: _('Outputs') if popup.is_invoice else '' text: _('Outputs') if popup.is_invoice else ''