mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-07 09:54:55 +00:00
Fixed an annoying off-by-1 error that was messing with scrollability.
This commit is contained in:
parent
d776317e81
commit
ac0176f057
@ -268,7 +268,7 @@ inline static void breakIntoSubLines(
|
||||
for (size_t i = 0; i < sanitizedWords.size(); i++) {
|
||||
std::string word = sanitizedWords.at(i);
|
||||
size_t wordLength = utf8Length(word);
|
||||
size_t extra = (i != 0);
|
||||
size_t extra = (i != 0) && (sanitizedWords.size() - 1);
|
||||
|
||||
/* we have enough space for this new word. accumulate it. the
|
||||
+1 here is to take the space into account */
|
||||
@ -312,6 +312,7 @@ inline static void breakIntoSubLines(
|
||||
}
|
||||
|
||||
void SimpleScrollAdapter::Entry::SetWidth(size_t width) {
|
||||
width--;
|
||||
if (this->width != width) {
|
||||
this->width = width;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user