Printers: fix glitches in PrinterListView and JobListView.
* Fix 12103.
This commit is contained in:
parent
162ae6204b
commit
f9f8bce6d2
@ -311,8 +311,12 @@ JobItem::DrawItem(BView *owner, BRect, bool complete)
|
||||
owner->DrawBitmap(fIcon, iconPt);
|
||||
|
||||
// left of item
|
||||
owner->DrawString(fName.String(), fName.Length(), namePt);
|
||||
owner->DrawString(fStatus.String(), fStatus.Length(), statusPt);
|
||||
BString name = fName;
|
||||
owner->TruncateString(&name, B_TRUNCATE_MIDDLE, pagePt.x - namePt.x);
|
||||
owner->DrawString(name.String(), name.Length(), namePt);
|
||||
BString status = fStatus;
|
||||
owner->TruncateString(&status, B_TRUNCATE_MIDDLE, sizePt.x - statusPt.x);
|
||||
owner->DrawString(status.String(), status.Length(), statusPt);
|
||||
|
||||
// right of item
|
||||
owner->DrawString(fPages.String(), fPages.Length(), pagePt);
|
||||
|
@ -446,15 +446,14 @@ PrinterItem::DrawItem(BView *owner, BRect /*bounds*/, bool complete)
|
||||
|
||||
// left of item
|
||||
BString s = fName;
|
||||
owner->TruncateString(&s, B_TRUNCATE_MIDDLE, pendingPt.x - namePt.x);
|
||||
|
||||
owner->SetFont(be_bold_font);
|
||||
owner->TruncateString(&s, B_TRUNCATE_MIDDLE, pendingPt.x - namePt.x);
|
||||
owner->DrawString(s.String(), s.Length(), namePt);
|
||||
owner->SetFont(&font);
|
||||
|
||||
s = B_TRANSLATE("Driver: %driver%");
|
||||
s.ReplaceFirst("%driver%", fDriverName);
|
||||
owner->TruncateString(&s, B_TRUNCATE_END, bounds.Width() - commentPt.x);
|
||||
owner->TruncateString(&s, B_TRUNCATE_END, commentPt.x - driverPt.x);
|
||||
owner->DrawString(s.String(), s.Length(), driverPt);
|
||||
|
||||
|
||||
@ -516,6 +515,7 @@ PrinterItem::UpdatePendingJobs()
|
||||
fPendingJobs = B_TRANSLATE("1 pending job.");
|
||||
return;
|
||||
} else if (pendingJobs > 1) {
|
||||
fPendingJobs = "";
|
||||
fPendingJobs << pendingJobs << B_TRANSLATE(" pending jobs.");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user