From 394eca93c8d35ef8a5924f7136aaf9637a0a1e39 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sun, 24 Dec 2017 18:03:52 -0800 Subject: [PATCH] Another potential fix for the BSD scrollbar issue. --- src/musikcube/cursespp/ListWindow.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/musikcube/cursespp/ListWindow.cpp b/src/musikcube/cursespp/ListWindow.cpp index 782681559..9ffe17ae5 100755 --- a/src/musikcube/cursespp/ListWindow.cpp +++ b/src/musikcube/cursespp/ListWindow.cpp @@ -36,11 +36,7 @@ #include #include "ListWindow.h" -#ifdef WIN32 -#define SCROLLER 0x258A -#else -#define SCROLLER (' ' | A_REVERSE) -#endif +#define WIN32_SCROLLER 0x258A using namespace cursespp; @@ -95,16 +91,17 @@ void ListWindow::DecorateFrame() { } auto frame = this->GetFrame(); - int x = getcurx(frame); - int y = getcury(frame); for (int i = 1; i < height - 1; i++) { - chtype ch = (i == offset) ? SCROLLER : ACS_VLINE; wmove(frame, i, this->GetWidth() - 1); - waddch(frame, ch); +#ifdef WIN32 + waddch(frame, (i == offset) ? WIN32_SCROLLER : ACS_VLINE); +#else + if (i == offset) wattron(frame, A_REVERSE); + waddch(frame, (i == offset) ? ' ' : ACS_VLINE); + if (i == offset) wattroff(frame, A_REVERSE); +#endif } - - wmove(frame, y, x); } } }