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