Fix incorrectly truncated menu labels.

An off-by-one error (> instead of >= really) was causing truncation when it
wasn't needed. But for some reason this only showed up when the main font size
was increased. I may or may not look into that, but this fixes the issue.

Maybe one of the faster bug logged to bug fixed times in Haiku history? ;)
This commit is contained in:
Ryan Leavengood 2012-08-03 23:52:15 -04:00
parent 33d23e8fed
commit 4ffc27fcc1

View File

@ -410,7 +410,7 @@ BMenuItem::DrawContent()
}
// truncate if needed
if (frameWidth > labelWidth)
if (frameWidth >= labelWidth)
fSuper->DrawString(fLabel);
else {
char *truncatedLabel = new char[strlen(fLabel) + 4];