[api] refactoring: removing screen measures as parameters of SoftwareManager.get_settings

This commit is contained in:
Vinicius Moreira
2022-04-08 17:41:29 -03:00
parent 3553b4faa4
commit 374b7ce03f
12 changed files with 47 additions and 50 deletions

View File

@@ -603,7 +603,7 @@ class FlatpakManager(SoftwareManager):
else:
traceback.print_exc()
def get_settings(self, screen_width: int, screen_height: int) -> Optional[ViewComponent]:
def get_settings(self) -> Optional[ViewComponent]:
if not self.context.root_user:
fields = []
@@ -622,7 +622,7 @@ class FlatpakManager(SoftwareManager):
options=install_opts,
default_option=[o for o in install_opts if o.value == flatpak_config['installation_level']][0],
max_per_line=len(install_opts),
max_width=floor(screen_width * 0.22),
max_width=floor(self.context.screen_width * 0.22),
type_=SelectViewType.RADIO))
return PanelComponent([FormComponent(fields, self.i18n['installation'].capitalize())])