chore(extension): update print menu to use new style

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2024-08-25 20:07:13 +02:00
parent d201f54cee
commit b77f1356bf

View File

@@ -104,18 +104,18 @@ class MainsailThemeInstallMenu(BaseMenu):
count = 62 - len(color) - len(RESET_FORMAT) count = 62 - len(color) - len(RESET_FORMAT)
menu = textwrap.dedent( menu = textwrap.dedent(
f""" f"""
/=======================================================\\ ╔═══════════════════════════════════════════════════════╗
| {color}{header:~^{count}}{RESET_FORMAT} | {color}{header:~^{count}}{RESET_FORMAT}
|-------------------------------------------------------| ╟───────────────────────────────────────────────────────╢
| {line1:<62} | {line1:<62}
| https://docs.mainsail.xyz/theming/themes | https://docs.mainsail.xyz/theming/themes
|-------------------------------------------------------| ╟───────────────────────────────────────────────────────╢
""" """
)[1:] )[1:]
for i, theme in enumerate(self.themes): for i, theme in enumerate(self.themes):
j: str = f" {i}" if i < 10 else f"{i}" j: str = f" {i}" if i < 10 else f"{i}"
row: str = f"{j}) [{theme.name}]" row: str = f"{j}) [{theme.name}]"
menu += f"| {row:<53} |\n" menu += f" {row:<53} \n"
print(menu, end="") print(menu, end="")
def load_themes(self) -> List[ThemeData]: def load_themes(self) -> List[ThemeData]: