kivy: improve layout of settings dialog
This commit is contained in:
parent
1af48b3769
commit
c447405087
|
@ -20,6 +20,7 @@ Builder.load_string('''
|
||||||
title: ''
|
title: ''
|
||||||
description: ''
|
description: ''
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
height: '60dp'
|
||||||
|
|
||||||
canvas.before:
|
canvas.before:
|
||||||
Color:
|
Color:
|
||||||
|
@ -30,20 +31,17 @@ Builder.load_string('''
|
||||||
on_release:
|
on_release:
|
||||||
Clock.schedule_once(self.action)
|
Clock.schedule_once(self.action)
|
||||||
|
|
||||||
Label:
|
Widget
|
||||||
|
TopLabel:
|
||||||
id: title
|
id: title
|
||||||
text: self.parent.title
|
text: self.parent.title
|
||||||
bold: True
|
bold: True
|
||||||
halign: 'left'
|
halign: 'left'
|
||||||
size_hint: 1, 1
|
TopLabel:
|
||||||
text_size: self.width, None
|
|
||||||
Label:
|
|
||||||
text: self.parent.description
|
text: self.parent.description
|
||||||
color: 0.8, 0.8, 0.8, 1
|
color: 0.8, 0.8, 0.8, 1
|
||||||
size_hint: 1, 1
|
|
||||||
halign: 'left'
|
halign: 'left'
|
||||||
text_size: self.width, None
|
Widget
|
||||||
CardSeparator
|
|
||||||
|
|
||||||
|
|
||||||
<SettingsDialog@Popup>
|
<SettingsDialog@Popup>
|
||||||
|
@ -52,49 +50,55 @@ Builder.load_string('''
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
ScrollView:
|
ScrollView:
|
||||||
size_hint: 1, 0.8
|
|
||||||
GridLayout:
|
GridLayout:
|
||||||
row_default_height: '68dp'
|
|
||||||
cols:1
|
|
||||||
id: scrollviewlayout
|
id: scrollviewlayout
|
||||||
|
cols:1
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
height: self.minimum_height
|
||||||
|
padding: '10dp'
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
lang: settings.get_language_name()
|
lang: settings.get_language_name()
|
||||||
title: 'Language' + ': ' + str(self.lang)
|
title: 'Language' + ': ' + str(self.lang)
|
||||||
description: _('Language')
|
description: _('Language')
|
||||||
action: partial(root.language_dialog, self)
|
action: partial(root.language_dialog, self)
|
||||||
height: '48dp'
|
CardSeparator
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
status: 'ON' if app.wallet.use_encryption else 'OFF'
|
status: 'ON' if app.wallet.use_encryption else 'OFF'
|
||||||
disabled: app.wallet.is_watching_only()
|
disabled: app.wallet.is_watching_only()
|
||||||
title: _('PIN code') + ': ' + self.status
|
title: _('PIN code') + ': ' + self.status
|
||||||
description: _("Change your PIN code.")
|
description: _("Change your PIN code.")
|
||||||
action: partial(root.change_password, self)
|
action: partial(root.change_password, self)
|
||||||
|
CardSeparator
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
bu: app.base_unit
|
bu: app.base_unit
|
||||||
title: _('Denomination') + ': ' + self.bu
|
title: _('Denomination') + ': ' + self.bu
|
||||||
description: _("Base unit for Bitcoin amounts.")
|
description: _("Base unit for Bitcoin amounts.")
|
||||||
action: partial(root.unit_dialog, self)
|
action: partial(root.unit_dialog, self)
|
||||||
|
CardSeparator
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
status: root.fee_status()
|
status: root.fee_status()
|
||||||
title: _('Fees') + ': ' + self.status
|
title: _('Fees') + ': ' + self.status
|
||||||
description: _("Fees paid to the Bitcoin miners.")
|
description: _("Fees paid to the Bitcoin miners.")
|
||||||
action: partial(root.fee_dialog, self)
|
action: partial(root.fee_dialog, self)
|
||||||
|
CardSeparator
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
status: root.fx_status()
|
status: root.fx_status()
|
||||||
title: _('Fiat Currency') + ': ' + self.status
|
title: _('Fiat Currency') + ': ' + self.status
|
||||||
description: _("Display amounts in fiat currency.")
|
description: _("Display amounts in fiat currency.")
|
||||||
action: partial(root.fx_dialog, self)
|
action: partial(root.fx_dialog, self)
|
||||||
|
CardSeparator
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
status: root.network_status()
|
status: root.network_status()
|
||||||
title: _('Network') + ': ' + self.status
|
title: _('Network') + ': ' + self.status
|
||||||
description: _("Network status and server selection.")
|
description: _("Network status and server selection.")
|
||||||
action: partial(root.network_dialog, self)
|
action: partial(root.network_dialog, self)
|
||||||
|
CardSeparator
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
status: 'ON' if bool(app.plugins.get('labels')) else 'OFF'
|
status: 'ON' if bool(app.plugins.get('labels')) else 'OFF'
|
||||||
title: _('Labels Sync') + ': ' + self.status
|
title: _('Labels Sync') + ': ' + self.status
|
||||||
description: _("Save and synchronize your labels.")
|
description: _("Save and synchronize your labels.")
|
||||||
action: partial(root.plugin_dialog, 'labels', self)
|
action: partial(root.plugin_dialog, 'labels', self)
|
||||||
|
CardSeparator
|
||||||
SettingsItem:
|
SettingsItem:
|
||||||
status: root.coinselect_status()
|
status: root.coinselect_status()
|
||||||
title: _('Coin selection') + ': ' + self.status
|
title: _('Coin selection') + ': ' + self.status
|
||||||
|
|
Loading…
Reference in New Issue