HaikuDepot: Truncate copyright label to 45 characters at most.
Some packages have excessively long copyright labels that were forcing the HaikuDepot window to become too wide. So in this case, put the full copyright string in the tooltip, and only the first 45 characters in the label.
This commit is contained in:
parent
e00a489b80
commit
aed889ae61
@ -395,7 +395,12 @@ public:
|
||||
fTitleView->SetText(package.Title());
|
||||
|
||||
BString publisher = package.Publisher().Name();
|
||||
fPublisherView->SetText(publisher);
|
||||
if (publisher.CountChars() > 45) {
|
||||
fPublisherView->SetToolTip(publisher);
|
||||
fPublisherView->SetText(publisher.TruncateChars(45)
|
||||
.Append(B_UTF8_ELLIPSIS));
|
||||
} else
|
||||
fPublisherView->SetText(publisher);
|
||||
|
||||
BString version = B_TRANSLATE("%Version%");
|
||||
version.ReplaceAll("%Version%", package.Version().ToString());
|
||||
|
Loading…
Reference in New Issue
Block a user