diff --git a/kiauh/components/klipper/klipper_setup.py b/kiauh/components/klipper/klipper_setup.py index 03d919d..2dde455 100644 --- a/kiauh/components/klipper/klipper_setup.py +++ b/kiauh/components/klipper/klipper_setup.py @@ -234,8 +234,6 @@ def display_moonraker_info(moonraker_list: List[Moonraker]) -> bool: "The following Klipper instances will be installed:", *[f"● klipper-{m.suffix}" for m in moonraker_list], ], - padding_top=0, - padding_bottom=0, ) _input: bool = get_confirm("Proceed with installation?") return _input diff --git a/kiauh/components/klipper/klipper_utils.py b/kiauh/components/klipper/klipper_utils.py index f0afff1..d85c699 100644 --- a/kiauh/components/klipper/klipper_utils.py +++ b/kiauh/components/klipper/klipper_utils.py @@ -103,7 +103,6 @@ def check_user_groups() -> None: "INFO:", "Relog required for group assignments to take effect!", ], - padding_bottom=0, ) if not get_confirm(f"Add user '{CURRENT_USER}' to group(s) now?"): diff --git a/kiauh/components/klipperscreen/klipperscreen.py b/kiauh/components/klipperscreen/klipperscreen.py index 81a5fad..3ed0694 100644 --- a/kiauh/components/klipperscreen/klipperscreen.py +++ b/kiauh/components/klipperscreen/klipperscreen.py @@ -68,8 +68,6 @@ def install_klipperscreen() -> None: "KlipperScreens update manager configuration for Moonraker " "will not be added to any moonraker.conf.", ], - padding_top=0, - padding_bottom=0, ) if not get_confirm( "Continue KlipperScreen installation?", diff --git a/kiauh/components/octoeverywhere/octoeverywhere_setup.py b/kiauh/components/octoeverywhere/octoeverywhere_setup.py index ef0e6d9..9940de4 100644 --- a/kiauh/components/octoeverywhere/octoeverywhere_setup.py +++ b/kiauh/components/octoeverywhere/octoeverywhere_setup.py @@ -63,8 +63,6 @@ def install_octoeverywhere() -> None: "It is safe to run the installer again to link your " "printer or repair any issues.", ], - padding_top=0, - padding_bottom=0, ) if not get_confirm("Re-run OctoEverywhere installation?"): Logger.print_info("Exiting OctoEverywhere for Klipper installation ...") @@ -85,8 +83,6 @@ def install_octoeverywhere() -> None: "\n\n", "The setup will apply the same names to OctoEverywhere!", ], - padding_top=0, - padding_bottom=0, ) if not get_confirm( diff --git a/kiauh/components/webui_client/client_dialogs.py b/kiauh/components/webui_client/client_dialogs.py index f2a7b0e..a615fb4 100644 --- a/kiauh/components/webui_client/client_dialogs.py +++ b/kiauh/components/webui_client/client_dialogs.py @@ -24,8 +24,6 @@ def print_moonraker_not_found_dialog() -> None: "another machine in your network. Otherwise Mainsail will NOT work " "correctly.", ], - padding_top=0, - padding_bottom=0, ) @@ -36,8 +34,6 @@ def print_client_already_installed_dialog(name: str) -> None: f"{name} seems to be already installed!", f"If you continue, your current {name} installation will be overwritten.", ], - padding_top=0, - padding_bottom=0, ) @@ -57,8 +53,6 @@ def print_client_port_select_dialog( "The following ports were found to be in use already:", *[f"● {port}" for port in ports_in_use], ], - padding_top=0, - padding_bottom=0, ) @@ -77,8 +71,6 @@ def print_install_client_config_dialog(client: BaseWebClient) -> None: "If you already use these macros skip this step. Otherwise you should " "consider to answer with 'Y' to download the recommended macros.", ], - padding_top=0, - padding_bottom=0, ) diff --git a/kiauh/core/logger.py b/kiauh/core/logger.py index 1a76cdb..0387163 100644 --- a/kiauh/core/logger.py +++ b/kiauh/core/logger.py @@ -92,8 +92,8 @@ class Logger: center_content: bool = False, custom_title: str | None = None, custom_color: DialogCustomColor | None = None, - padding_top: int = 1, - padding_bottom: int = 1, + margin_top: int = 0, + margin_bottom: int = 0, ) -> None: """ Prints a dialog with the given title and content. @@ -106,8 +106,8 @@ class Logger: :param center_content: Whether to center the content or not. :param custom_title: A custom title for the dialog. :param custom_color: A custom color for the dialog. - :param padding_top: The number of empty lines to print before the dialog. - :param padding_bottom: The number of empty lines to print after the dialog. + :param margin_top: The number of empty lines to print before the dialog. + :param margin_bottom: The number of empty lines to print after the dialog. """ dialog_color = Logger._get_dialog_color(title, custom_color) dialog_title = Logger._get_dialog_title(title, custom_title) @@ -116,12 +116,12 @@ class Logger: top = Logger._format_top_border(dialog_color) bottom = Logger._format_bottom_border() - print("\n" * padding_top) + print("\n" * margin_top) print( f"{top}{dialog_title_formatted}{dialog_content}{bottom}", end="", ) - print("\n" * padding_bottom) + print("\n" * margin_bottom) @staticmethod def _get_dialog_title( diff --git a/kiauh/core/menus/update_menu.py b/kiauh/core/menus/update_menu.py index 39b5d1c..daa6b21 100644 --- a/kiauh/core/menus/update_menu.py +++ b/kiauh/core/menus/update_menu.py @@ -281,8 +281,6 @@ class UpdateMenu(BaseMenu): DialogType.CUSTOM, ["The following packages will be upgraded:", "\n\n", pkgs], custom_title="UPGRADABLE SYSTEM UPDATES", - padding_top=0, - padding_bottom=0, ) if not get_confirm("Continue?"): return diff --git a/kiauh/extensions/telegram_bot/moonraker_telegram_bot_extension.py b/kiauh/extensions/telegram_bot/moonraker_telegram_bot_extension.py index 1a27643..29580b0 100644 --- a/kiauh/extensions/telegram_bot/moonraker_telegram_bot_extension.py +++ b/kiauh/extensions/telegram_bot/moonraker_telegram_bot_extension.py @@ -49,8 +49,6 @@ class TelegramBotExtension(BaseExtension): "Moonraker Telegram Bot requires Moonraker to be installed. " "Please install Moonraker first!", ], - padding_top=0, - padding_bottom=0, ) return @@ -65,8 +63,6 @@ class TelegramBotExtension(BaseExtension): "\n\n", "The setup will apply the same names to Telegram Bot!", ], - padding_top=0, - padding_bottom=0, ) if not get_confirm( "Continue Moonraker Telegram Bot installation?", diff --git a/kiauh/procedures/system.py b/kiauh/procedures/system.py index 6c830b7..93bf058 100644 --- a/kiauh/procedures/system.py +++ b/kiauh/procedures/system.py @@ -35,8 +35,6 @@ def change_system_hostname() -> None: "browser.", ], custom_title="CHANGE SYSTEM HOSTNAME", - padding_top=0, - padding_bottom=0, ) if not get_confirm("Do you want to change the hostname?", default_choice=False): return @@ -50,8 +48,6 @@ def change_system_hostname() -> None: "● Any special characters", "● No leading or trailing '-'", ], - padding_top=0, - padding_bottom=0, ) hostname = get_string_input( "Enter the new hostname",