From ff0f0e8093dbf36f017c3ce7c7cce0af5493c11e Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 3 Dec 2023 08:31:50 -0800 Subject: [PATCH] change filled bar char for better visual distinction --- examples_linux/ncurses/scanner_curses.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples_linux/ncurses/scanner_curses.cpp b/examples_linux/ncurses/scanner_curses.cpp index 772cd836c..9df42ffcf 100644 --- a/examples_linux/ncurses/scanner_curses.cpp +++ b/examples_linux/ncurses/scanner_curses.cpp @@ -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));