From 1fdc8a64fb2f7e969214f1e793a7b38c6dfb9f75 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 6 Sep 2024 16:33:39 +0200 Subject: [PATCH] ProgressBar: use double horizontal line instead of "=====" --- NEWS | 1 + src/ProgressBar.cxx | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 93697914..501ca8c8 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/src/ProgressBar.cxx b/src/ProgressBar.cxx index 10587693..628a8e41 100644 --- a/src/ProgressBar.cxx +++ b/src/ProgressBar.cxx @@ -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;