MGR: fix text position in progress bars

svn path=/trunk/boinc/; revision=16148
This commit is contained in:
Charlie Fenton 2008-10-07 01:11:06 +00:00
parent 4ed28dab7a
commit 7b53ee40f1
1 changed files with 4 additions and 3 deletions

View File

@ -314,10 +314,14 @@ void CBOINCListCtrl::DrawProgressBars()
#endif
r.x = x;
r.width = w;
r.Inflate(-1, -2);
rr = r;
wxString progressString = m_pParentView->GetProgressText(row);
dc.GetTextExtent(progressString, &xx, &yy);
r.y += (r.height - yy - 1) / 2;
// Adapted from ellipis code in wxRendererGeneric::DrawHeaderButtonContents()
if (xx > r.width) {
int ellipsisWidth;
@ -334,9 +338,6 @@ void CBOINCListCtrl::DrawProgressBars()
xx += ellipsisWidth;
}
}
rr = r;
rr.Inflate(-1, -2);
dc.SetLogicalFunction(wxCOPY);
dc.SetBackgroundMode(wxSOLID);