Tracker: Made open-with menu scale with font size.
This commit is contained in:
@@ -1159,6 +1159,7 @@ OpenWithMenu::DoneBuildingItemList()
|
|||||||
// add apps as menu items
|
// add apps as menu items
|
||||||
BFont font;
|
BFont font;
|
||||||
GetFont(&font);
|
GetFont(&font);
|
||||||
|
float scaling = font.Size() / 12.0f;
|
||||||
|
|
||||||
int32 lastRelation = -1;
|
int32 lastRelation = -1;
|
||||||
for (int32 index = 0; index < count ; index++) {
|
for (int32 index = 0; index < count ; index++) {
|
||||||
@@ -1188,7 +1189,8 @@ OpenWithMenu::DoneBuildingItemList()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
result = path.Path();
|
result = path.Path();
|
||||||
font.TruncateString(&result, B_TRUNCATE_MIDDLE, kMaxMenuWidth);
|
font.TruncateString(&result, B_TRUNCATE_MIDDLE,
|
||||||
|
kMaxMenuWidth * scaling);
|
||||||
}
|
}
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
BString relationDescription;
|
BString relationDescription;
|
||||||
|
|||||||
Reference in New Issue
Block a user