ActivityMonitor: fix non-i18n-friendly string

Fixes #16008
This commit is contained in:
Adrien Destugues
2020-05-11 17:27:49 +02:00
parent 9cfe144326
commit a22fff485c
2 changed files with 9 additions and 7 deletions
+1 -2
View File
@@ -1448,8 +1448,7 @@ ActivityView::Draw(BRect updateRect)
BString label = source->Label();
float possibleLabelWidth = frame.right - colorBox.right - 12 - width;
// TODO: TruncateString() is broken... remove + 5 when fixed!
if (ceilf(StringWidth(label.String()) + 5) > possibleLabelWidth)
if (ceilf(StringWidth(label.String())) > possibleLabelWidth)
label = source->ShortLabel();
TruncateString(&label, B_TRUNCATE_MIDDLE, possibleLabelWidth);