From a449e2305cd4e91398c2422711c6cbbb16b7798d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 19 Jul 2016 23:45:46 +0200 Subject: [PATCH] Tracker: Made open-with menu scale with font size. --- src/kits/tracker/OpenWithWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/OpenWithWindow.cpp b/src/kits/tracker/OpenWithWindow.cpp index 607500202f..c3c120d033 100644 --- a/src/kits/tracker/OpenWithWindow.cpp +++ b/src/kits/tracker/OpenWithWindow.cpp @@ -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;