Merge pull request #2877 from Neved4/medium-line

fix: Use `ncurses` dedicated functions for the separator line
This commit is contained in:
RazCrimson 2024-07-16 01:06:38 +05:30 committed by GitHub
commit e086625f1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -446,12 +446,15 @@ class _GlancesCurses:
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):