diff --git a/src/reactor_sim/dashboard.py b/src/reactor_sim/dashboard.py index 03f7f61..d07a83c 100644 --- a/src/reactor_sim/dashboard.py +++ b/src/reactor_sim/dashboard.py @@ -224,17 +224,19 @@ class ReactorDashboard: def _draw(self, stdscr: "curses._CursesWindow", state: PlantState) -> None: stdscr.erase() height, width = stdscr.getmaxyx() - if height < 20 or width < 70: + min_status = 4 + if height < min_status + 12 or width < 70: stdscr.addstr( 0, 0, - "Terminal too small; try >=70x20 or reduce font size.".ljust(width), + "Terminal too small; try >=70x16 or reduce font size.".ljust(width), curses.color_pair(4), ) stdscr.refresh() return - data_height = height - 5 + status_height = min_status + data_height = height - status_height right_width = max(28, width // 3) left_width = width - right_width if left_width < 50: @@ -243,7 +245,7 @@ class ReactorDashboard: data_win = stdscr.derwin(data_height, left_width, 0, 0) help_win = stdscr.derwin(data_height, right_width, 0, left_width) - status_win = stdscr.derwin(6, width, data_height, 0) + status_win = stdscr.derwin(status_height, width, data_height, 0) self._draw_data_panel(data_win, state) self._draw_help_panel(help_win)