From 2bb71a6e3d2b4f4959838aed317ed3a536009998 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Sun, 14 Jan 2024 21:38:22 +0000 Subject: [PATCH] Improve scaling by using responsive rows for toggle switches and mutliline checkboxes --- openandroidinstaller/views/requirements_view.py | 2 +- openandroidinstaller/views/start_view.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openandroidinstaller/views/requirements_view.py b/openandroidinstaller/views/requirements_view.py index 05f7f2e8..0954f052 100644 --- a/openandroidinstaller/views/requirements_view.py +++ b/openandroidinstaller/views/requirements_view.py @@ -139,7 +139,7 @@ def build(self): required_android_version = self.state.config.requirements.get("android") if required_android_version: android_checkbox = Checkbox( - label="The required android version is installed. (Or I know the risk of continuing)", + label="The required android version is installed.\n(Or I know the risk of continuing)", on_change=self.enable_continue_button, ) android_version_check = Card( diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index f7333429..8a752bf3 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -26,6 +26,7 @@ OutlinedButton, FilledButton, Row, + ResponsiveRow, TextButton, colors, icons, @@ -106,6 +107,7 @@ def check_bootloader_unlocked(e): disabled=True, inactive_thumb_color=colors.YELLOW, active_color=colors.GREEN, + col={"xl": 6}, ) # toggleswitch to allow skipping flashing recovery @@ -119,6 +121,7 @@ def check_recovery_already_flashed(e): disabled=True, inactive_thumb_color=colors.YELLOW, active_color=colors.GREEN, + col={"xl": 6}, ) # inform the user about the device detection @@ -202,7 +205,7 @@ def build(self): alignment="center", ), Divider(), - Row([self.bootloader_switch, self.recovery_switch]), + ResponsiveRow([self.bootloader_switch, self.recovery_switch]), ] ) return self.view