- # Add horizontal line
- lin_width = header_width
- if len(top) < header_width:
- lin_width = len(top)
- self.main_win.hline(1, 0, curses.ACS_HLINE, lin_width)
-
- # Show current side
- self.main_win.addstr(
- 2,
- 0,
- textwrap.fill(
- self.stack[self.obj.getIdx()][
- self.stack[self.obj.getIdx()].getSide()
- ],
- width=self.wrap_width(),
- ),
- )
+ self.main_win.addstr(
+ 0,
+ 0,
+ textwrap.shorten(top, width=header_width, placeholder="…"),
+ curses.A_BOLD,
+ )
+
+ # Add horizontal line
+ lin_width = header_width
+ if len(top) < header_width:
+ lin_width = len(top)
+ self.main_win.hline(1, 0, curses.ACS_HLINE, lin_width)
+
+ # Show current side
+ self.main_win.addstr(
+ 2,
+ 0,
+ textwrap.fill(
+ self.current_card().get(),
+ width=self.wrap_width(),
+ ),
+ )