From 904c32ba29134bb4e69944e58cf524b8391b4fd0 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 3 Apr 2024 21:53:32 +0300 Subject: [PATCH] Updated for form height --- slpkg/dialog_box.py | 4 ++-- slpkg/dialog_configs.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/slpkg/dialog_box.py b/slpkg/dialog_box.py index b3d8b769..0aeaf852 100644 --- a/slpkg/dialog_box.py +++ b/slpkg/dialog_box.py @@ -34,14 +34,14 @@ class DialogBox(Configs): return code, tags - def mixedform(self, text: str, title: str, elements: list, height: int, width: int) -> Tuple[bool, list]: + def mixedform(self, text: str, title: str, elements: list, height: int, width: int, form_height) -> Tuple[bool, list]: """ Display a mixedform box. """ self.more_kwargs.update( {"item_help": True, "help_tags": True} ) code, tags = self.d.mixedform(text=text, title=title, elements=elements, # type: ignore - height=height, width=width, help_button=True, + height=height, width=width, form_height=form_height, help_button=True, help_status=True, **self.more_kwargs) return code, tags diff --git a/slpkg/dialog_configs.py b/slpkg/dialog_configs.py index c0723ad6..bf5c8fe4 100644 --- a/slpkg/dialog_configs.py +++ b/slpkg/dialog_configs.py @@ -33,6 +33,7 @@ class FormConfigs(Configs): elements: list = [] height: int = 35 width: int = 74 + form_height: int = 0 text: str = f'Edit the configuration file: {self.config_file}' title: str = ' Configuration File ' @@ -46,7 +47,7 @@ class FormConfigs(Configs): [(key, i, 1, str(value), i, 21, 47, 200, '0x0', f'Config: {key} = {value}')] ) - code, tags = self.dialogbox.mixedform(text, title, elements, height, width) + code, tags = self.dialogbox.mixedform(text, title, elements, height, width, form_height) os.system('clear')