Skip to content

Commit

Permalink
Merge pull request #2877 from Neved4/medium-line
Browse files Browse the repository at this point in the history
fix: Use `ncurses` dedicated functions for the separator line
  • Loading branch information
RazCrimson authored Jul 15, 2024
2 parents 413df02 + bfdf899 commit e086625
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions glances/outputs/glances_curses.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,15 @@ def separator_line(self, color='SEPARATOR'):
self.line -= 1
line_width = self.term_window.getmaxyx()[1] - self.column
if self.line >= 0:
self.term_window.addnstr(
self.line,
self.column,
unicode_message('MEDIUM_LINE', self.args) * line_width,
position = [self.line, self.column]
line_color = self.colors_list[color]
line_type = curses.ACS_HLINE if not self.args.disable_unicode else unicode_message('MEDIUM_LINE', self.args)

self.term_window.hline(
*position,
line_type,
line_width,
self.colors_list[color],
line_color,
)

def __get_stat_display(self, stats, layer):
Expand Down

0 comments on commit e086625

Please sign in to comment.