diff --git a/base/setup/initial/textmode/wsetup_screen.py b/base/setup/initial/textmode/wsetup_screen.py index 23e1d6b..2e40b6b 100644 --- a/base/setup/initial/textmode/wsetup_screen.py +++ b/base/setup/initial/textmode/wsetup_screen.py @@ -11,6 +11,7 @@ COLOR_PAIR_NORMAL_TEXT = 1 COLOR_PAIR_BRIGHT_TEXT = 2 COLOR_PAIR_HIGHLIGHT_OPTION = 3 COLOR_PAIR_INSTRUCTIONS = 4 +COLOR_PAIR_PROGRESS = 5 # Coords for the working area # @@ -43,6 +44,11 @@ def wsetup_screen_init(stdscr): curses.COLOR_BLACK, curses.COLOR_WHITE ) + curses.init_pair( + COLOR_PAIR_PROGRESS, + curses.COLOR_YELLOW, + curses.COLOR_BLUE + ) try: curses.init_pair( @@ -134,6 +140,14 @@ def wsetup_screen_write_direct(stdscr, y, x, text, attr): def wsetup_screen_write_simple(stdscr, y, x, text, attr): wsetup_screen_write_direct(stdscr, WSETUP_MAIN_Y + y, WSETUP_MAIN_X + x, text, attr) +def wsetup_screen_draw_bar(stdscr, y, x, width): + for i in range(width): + stdscr.addch( + y, x + i, + curses.ACS_BLOCK, + curses.color_pair(COLOR_PAIR_PROGRESS) + ) + def wsetup_screen_draw_box(stdscr, y, x, height, width): # Top left corner # diff --git a/base/setup/initial/textmode/wsetup_step.py b/base/setup/initial/textmode/wsetup_step.py index b912f07..74f8123 100644 --- a/base/setup/initial/textmode/wsetup_step.py +++ b/base/setup/initial/textmode/wsetup_step.py @@ -309,11 +309,17 @@ def wsetup_step_install_base(stdscr): wsetup_screen_write_simple( stdscr, - box_y + 1, - wsetup_screen_get_scaled_x(stdscr, 40) - 2, + box_y + 2, + wsetup_screen_get_scaled_x(stdscr, 40) - 3, progress, curses.color_pair(COLOR_PAIR_NORMAL_TEXT) ) + wsetup_screen_draw_bar( + stdscr, + progbox_y + 1, + progbox_x + 1, + progbox_w - 2 + ) stdscr.refresh()