index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Werner Llácer <wllacer@gmail.com> | 2022-03-01 12:36:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 12:36:58 +0100 |
commit | 47a9fba94b819c4184b0378b1241857df1e0ba39 (patch) | |
tree | 6eaff298bf92a529ef127a008e1fbbe9d4cf0c32 /archinstall/lib | |
parent | 86d991f4422d920ca714f459be3be4352d1c40a1 (diff) |
-rw-r--r-- | archinstall/lib/menu/selection_menu.py | 12 |
diff --git a/archinstall/lib/menu/selection_menu.py b/archinstall/lib/menu/selection_menu.py index 8ac7dc99..9b40b0e7 100644 --- a/archinstall/lib/menu/selection_menu.py +++ b/archinstall/lib/menu/selection_menu.py @@ -179,7 +179,7 @@ class Selector: self.set_enabled(True) class GeneralMenu: - def __init__(self, data_store :dict = None, auto_cursor=False): + def __init__(self, data_store :dict = None, auto_cursor=False, preview_size :float = 0.2): """ Create a new selection menu. @@ -189,6 +189,9 @@ class GeneralMenu: :param auto_cursor: Boolean which determines if the cursor stays on the first item (false) or steps each invocation of a selection entry (true) :type auto_cursor: bool + :param preview_size. Size in fractions of screen size of the preview window + ;type preview_size: float (range 0..1) + """ self._translation = Translation.load_nationalization() self.is_context_mgr = False @@ -196,6 +199,7 @@ class GeneralMenu: self.auto_cursor = auto_cursor self._menu_options = {} self._setup_selection_menu_options() + self.preview_size = preview_size def __enter__(self, *args :Any, **kwargs :Any) -> GeneralMenu: self.is_context_mgr = True @@ -292,7 +296,7 @@ class GeneralMenu: sort=False, cursor_index=cursor_pos, preview_command=self._preview_display, - preview_size=0.5 + preview_size=self.preview_size ).run() if selection and self.auto_cursor: @@ -551,7 +555,7 @@ class GlobalMenu(GeneralMenu): self._menu_options['save_config'] = \ Selector( _('Save configuration'), - lambda: save_config(self._data_store), + lambda preset: save_config(self._data_store), enabled=True, no_store=True) self._menu_options['install'] = \ @@ -688,4 +692,4 @@ class GlobalMenu(GeneralMenu): def _users_resynch(self): self.synch('!superusers') self.synch('!users') - return False
\ No newline at end of file + return False |