Skip to content

Commit

Permalink
change filled bar char for better visual distinction
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Dec 3, 2023
1 parent 6d60858 commit ff0f0e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples_linux/ncurses/scanner_curses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ class ProgressBar
int offset_x = 5;
move(y, x + offset_x);
for (int i = offset_x; i < w - 3; ++i) {
int bar_color = i < (filled + offset_x) ? 5 : color;
bool bar_filled = i < (filled + offset_x);
int bar_color = bar_filled ? 5 : color;
attron(COLOR_PAIR(bar_color));
addch(ACS_HLINE);
addch(bar_filled ? '=' : ACS_HLINE);
attroff(COLOR_PAIR(bar_color));
}
attron(COLOR_PAIR(color));
Expand Down

0 comments on commit ff0f0e8

Please sign in to comment.