diff --git a/src/Views/EncryptView.vala b/src/Views/EncryptView.vala index 3d6606522..cc559da9d 100644 --- a/src/Views/EncryptView.vala +++ b/src/Views/EncryptView.vala @@ -72,6 +72,15 @@ public class EncryptView : AbstractInstallerView { "slate" ); + var message_box = new Gtk.ListBox () { + selection_mode = BROWSE + }; + message_box.add_css_class (Granite.STYLE_CLASS_RICH_LIST); + message_box.add_css_class (Granite.STYLE_CLASS_BACKGROUND); + message_box.append (protect_row); + message_box.append (restart_row); + message_box.append (keyboard_row); + pw_error_revealer = new ErrorRevealer ("."); pw_error_revealer.label_widget.add_css_class (Granite.STYLE_CLASS_WARNING); @@ -114,9 +123,7 @@ public class EncryptView : AbstractInstallerView { title_area.append (title_label); content_area.valign = CENTER; - content_area.append (protect_row); - content_area.append (restart_row); - content_area.append (keyboard_row); + content_area.append (message_box); content_area.append (password_box); encrypt_button = new Gtk.Button.with_label (_("Set Encryption Password")) { @@ -154,6 +161,21 @@ public class EncryptView : AbstractInstallerView { confirm_entry.is_valid = confirm_password (); update_next_button (); }); + + // Forward keys so we can type immediate when list is focused + var key_controller = new Gtk.EventControllerKey (); + key_controller.key_pressed.connect ((keyval, keycode, state) => { + if (Gdk.keyval_to_unicode (keyval) != 0) { + key_controller.forward (pw_entry.get_delegate ()); + pw_entry.grab_focus (); + pw_entry.select_region (-1, -1); + return Gdk.EVENT_STOP; + } + + return Gdk.EVENT_PROPAGATE; + }); + + message_box.add_controller (key_controller); } private bool check_password () { diff --git a/src/Widgets/DescriptionRow.vala b/src/Widgets/DescriptionRow.vala index a9ace185e..6ce7d528b 100644 --- a/src/Widgets/DescriptionRow.vala +++ b/src/Widgets/DescriptionRow.vala @@ -34,5 +34,13 @@ public class DescriptionRow : Gtk.Box { spacing = 12; append (image); append (description_label); + + // prevent titles from being skipped + map.connect (() => { + parent.update_property ( + Gtk.AccessibleProperty.LABEL, description, + -1 + ); + }); } }