mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-07 09:54:55 +00:00
Use mvwvline() to draw scrollbar -- maybe this will fix the problem some
FreeBSD users have?
This commit is contained in:
parent
6fdb0ceaeb
commit
141a8d20d8
@ -72,15 +72,11 @@ void Scrollbar::Draw(ListWindow* list, Window* target) {
|
||||
yOffset = -1;
|
||||
}
|
||||
else {
|
||||
float percent = (float)pos.logicalIndex / total;
|
||||
yOffset = (int)(range * percent) + minY;
|
||||
float percent = (float) pos.logicalIndex / total;
|
||||
yOffset = (int) (range * percent) + minY;
|
||||
}
|
||||
|
||||
for (int i = from; i < to; i++) {
|
||||
wmove(frame, i, xOffset);
|
||||
if (i == yOffset) wattron(frame, A_REVERSE);
|
||||
waddch(frame, (i == yOffset) ? ' ' : ACS_VLINE);
|
||||
if (i == yOffset) wattroff(frame, A_REVERSE);
|
||||
}
|
||||
mvwvline(frame, from, xOffset, 0, to - from);
|
||||
mvwaddch(frame, yOffset, xOffset, ' ' | A_REVERSE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user