mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Make line wrapping less bad in ListWindow if we don't calculate column
width correctly.
This commit is contained in:
parent
c3231a49aa
commit
a42efaa97f
@ -133,6 +133,7 @@ void ScrollAdapterBase::DrawPage(ScrollableWindow* scrollable, size_t index, Scr
|
|||||||
for (size_t e = 0; e < visible.size(); e++) {
|
for (size_t e = 0; e < visible.size(); e++) {
|
||||||
EntryPtr entry = visible.at(e);
|
EntryPtr entry = visible.at(e);
|
||||||
size_t count = entry->GetLineCount();
|
size_t count = entry->GetLineCount();
|
||||||
|
wmove(window, drawnLines, 0);
|
||||||
|
|
||||||
for (size_t i = 0; i < count && drawnLines < this->height; i++) {
|
for (size_t i = 0; i < count && drawnLines < this->height; i++) {
|
||||||
Color attrs = Color::Default;
|
Color attrs = Color::Default;
|
||||||
@ -161,7 +162,6 @@ void ScrollAdapterBase::DrawPage(ScrollableWindow* scrollable, size_t index, Scr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* string is padded above, we don't need a \n */
|
/* string is padded above, we don't need a \n */
|
||||||
|
|
||||||
checked_wprintw(window, "%s", line.c_str());
|
checked_wprintw(window, "%s", line.c_str());
|
||||||
|
|
||||||
if (attrs != -1) {
|
if (attrs != -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user