From ac5565ed0a0cef1ac4e77875bf73c243059f8a29 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 27 Mar 2021 12:19:38 +0100 Subject: [PATCH] kivy: minor GUI improvements --- electrum/gui/kivy/uix/dialogs/checkbox_dialog.py | 14 ++++++++++---- electrum/gui/kivy/uix/dialogs/choice_dialog.py | 4 +++- electrum/gui/kivy/uix/dialogs/settings.py | 4 ++-- electrum/gui/messages.py | 4 +++- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/electrum/gui/kivy/uix/dialogs/checkbox_dialog.py b/electrum/gui/kivy/uix/dialogs/checkbox_dialog.py index dfdf7b62c..e14336750 100644 --- a/electrum/gui/kivy/uix/dialogs/checkbox_dialog.py +++ b/electrum/gui/kivy/uix/dialogs/checkbox_dialog.py @@ -3,18 +3,24 @@ from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder + + + Builder.load_string(''' id: popup title: '' + description: '' size_hint: 0.8, 0.8 pos_hint: {'top':0.9} BoxLayout: orientation: 'vertical' + padding: '10dp' + spacing: '10dp' Label: - id: description - text: '' - halign: 'left' + size_hint: 1, None + text: root.description + halign: 'justify' text_size: self.width, None size: self.texture_size BoxLayout: @@ -47,6 +53,6 @@ class CheckBoxDialog(Factory.Popup): def __init__(self, title, text, status, callback): Factory.Popup.__init__(self) self.ids.cb.active = status - self.ids.description.text = text + self.description = text self.callback = callback self.title = title diff --git a/electrum/gui/kivy/uix/dialogs/choice_dialog.py b/electrum/gui/kivy/uix/dialogs/choice_dialog.py index e32da74f3..1bbf2cba4 100644 --- a/electrum/gui/kivy/uix/dialogs/choice_dialog.py +++ b/electrum/gui/kivy/uix/dialogs/choice_dialog.py @@ -15,10 +15,12 @@ Builder.load_string(''' pos_hint: {'top':0.9} BoxLayout: orientation: 'vertical' + padding: '10dp' + spacing: '10dp' Label: size_hint: 1, None text: root.description - halign: 'left' + halign: 'justify' text_size: self.width, None size: self.texture_size ScrollView: diff --git a/electrum/gui/kivy/uix/dialogs/settings.py b/electrum/gui/kivy/uix/dialogs/settings.py index 0ef25698a..072fe526f 100644 --- a/electrum/gui/kivy/uix/dialogs/settings.py +++ b/electrum/gui/kivy/uix/dialogs/settings.py @@ -83,10 +83,10 @@ Builder.load_string(''' CardSeparator SettingsItem: status: _('Yes') if app.use_recoverable_channels else _('No') - title: _('Use recoverable channels') + ': ' + self.status + title: _('Create recoverable channels') + ': ' + self.status description: _("Add channel recovery data to funding transaction.") message: _(messages.MSG_RECOVERABLE_CHANNELS) - action: partial(root.boolean_dialog, 'use_recoverable_channels', _('Use recoverable_channels'), self.message) + action: partial(root.boolean_dialog, 'use_recoverable_channels', _('Create recoverable channels'), self.message) CardSeparator SettingsItem: status: _('Trampoline') if not app.use_gossip else _('Gossip') diff --git a/electrum/gui/messages.py b/electrum/gui/messages.py index 11715e8b6..1cfda6c8a 100644 --- a/electrum/gui/messages.py +++ b/electrum/gui/messages.py @@ -8,7 +8,9 @@ Note that static backups only allow you to request a force-close with the remote If this is enabled, other nodes cannot open a channel to you. Channel recovery data is encrypted, so that only your wallet can decrypt it. However, blockchain analysis will be able to tell that the transaction was probably created by Electrum. """ -MSG_REQUEST_FORCE_CLOSE = """If you choose to request force-close, your node will pretend that it has lost its data and ask the remote node to broadcast their latest state. Doing so from time to time helps make sure that nodes are honest, because your node can punish them if they broadcast a revoked state.""" +MSG_REQUEST_FORCE_CLOSE = """You may choose to initiate a cooperative close, or request the remote peer to force close the channel. + +If you request a force-close, your node will pretend that it has lost its data and ask the remote node to broadcast their latest state. Doing so from time to time helps make sure that nodes are honest, because your node can punish them if they broadcast a revoked state.""" MSG_CREATED_NON_RECOVERABLE_CHANNEL = """ The channel you created is not recoverable from seed.