DIRECTOR: Utilise MacText class to provide Text Wrapping.

This commit is contained in:
stevenhoefel 2017-01-15 18:42:50 +11:00
parent 8b4460e310
commit 2e48529fa1
5 changed files with 85 additions and 92 deletions

View file

@ -227,7 +227,7 @@ int wordWrapTextImpl(const Font &font, const StringType &str, int maxWidth, Comm
if (lineWidth > 0) {
wrapper.add(line, lineWidth);
}
return wrapper.actualMaxLineWidth;
return MAX(wrapper.actualMaxLineWidth, maxWidth);
}
} // End of anonymous namespace