From 59a500c9e547fa44920c9437fa3ecd345444e733 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 20 Feb 2018 14:31:40 +1300 Subject: [PATCH 1/2] add more space between form rows, align help to the left --- subiquity/ui/views/identity.py | 2 +- subiquitycore/ui/form.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/subiquity/ui/views/identity.py b/subiquity/ui/views/identity.py index 6fe8b679..43487fc5 100644 --- a/subiquity/ui/views/identity.py +++ b/subiquity/ui/views/identity.py @@ -187,7 +187,7 @@ class IdentityView(BaseView): iu.caption = _ssh_import_captions[val] iu.enabled = val is not None if val is not None: - self.form_rows.body.focus += 1 + self.form_rows.body.focus += 2 def done(self, result): cpassword = self.model.encrypt_password(self.form.password.value) diff --git a/subiquitycore/ui/form.py b/subiquitycore/ui/form.py index 335e2ef0..f01ef09a 100644 --- a/subiquitycore/ui/form.py +++ b/subiquitycore/ui/form.py @@ -105,7 +105,7 @@ class BoundFormField(object): self.form = form self.in_error = False self._help = None - self.help_text = Text("", align="center") + self.help_text = Text("") self._caption = None self.pile = None self._enabled = True @@ -331,6 +331,8 @@ class Form(object, metaclass=MetaForm): rows = [] for field in self._fields: rows.append(field.as_row(view, longest_caption)) + rows.append(Text("")) + del rows[-1:] return rows def validated(self): From 1f937090c0ea78365f677773dcd25e98fd7e55dc Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 12 Mar 2018 20:29:44 +1300 Subject: [PATCH 2/2] update help text for address --- subiquitycore/ui/views/network_configure_manual_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subiquitycore/ui/views/network_configure_manual_interface.py b/subiquitycore/ui/views/network_configure_manual_interface.py index c8dbb72a..d98c0eb5 100644 --- a/subiquitycore/ui/views/network_configure_manual_interface.py +++ b/subiquitycore/ui/views/network_configure_manual_interface.py @@ -121,7 +121,7 @@ class BaseNetworkConfigureManualView(BaseView): connect_signal(self.form, 'submit', self.done) connect_signal(self.form, 'cancel', self.cancel) - self.form.subnet.help = _("CIDR e.g. %s"%(self.example_address,)) + self.form.subnet.help = _("Example: %s"%(self.example_address,)) configured_addresses = self.dev.configured_ip_addresses_for_version(self.ip_version) if configured_addresses: addr = ipaddress.ip_interface(configured_addresses[0])