Skip to content

Commit

Permalink
ProgressBar: use double horizontal line instead of "====="
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 6, 2024
1 parent 8ffa8f4 commit 1fdc8a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ncmpc 0.50 - not yet released
* build: require Meson 0.60
* require libfmt 9
* draw progress bar as Unicode double line
* lyrics/musixmatch: add new lyrics extension
* lyrics/google: fix partial loading of lyrics

Expand Down
7 changes: 6 additions & 1 deletion src/ProgressBar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ ProgressBar::Paint() const noexcept

SelectStyle(window, Style::PROGRESSBAR);

if (width > 0)
if (width > 0) {
#if NCURSES_WIDECHAR
window.HLine({0, 0}, width, WACS_D_HLINE);
#else
window.HLine({0, 0}, width, '=');
#endif
}

window.Char({(int)width, 0}, '>');
unsigned x = width + 1;
Expand Down

0 comments on commit 1fdc8a6

Please sign in to comment.