Tracker: Made open-with menu scale with font size.

This commit is contained in:
Axel Dörfler
2016-07-19 23:57:26 +02:00
parent 36c80cff6e
commit a449e2305c
+3 -1
View File
@@ -1159,6 +1159,7 @@ OpenWithMenu::DoneBuildingItemList()
// add apps as menu items
BFont font;
GetFont(&font);
float scaling = font.Size() / 12.0f;
int32 lastRelation = -1;
for (int32 index = 0; index < count ; index++) {
@@ -1188,7 +1189,8 @@ OpenWithMenu::DoneBuildingItemList()
continue;
}
result = path.Path();
font.TruncateString(&result, B_TRUNCATE_MIDDLE, kMaxMenuWidth);
font.TruncateString(&result, B_TRUNCATE_MIDDLE,
kMaxMenuWidth * scaling);
}
#if DEBUG
BString relationDescription;