From 7b53ee40f1ea2b63c3c3ac95011c8e6bff9a9219 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 7 Oct 2008 01:11:06 +0000 Subject: [PATCH] MGR: fix text position in progress bars svn path=/trunk/boinc/; revision=16148 --- clientgui/BOINCListCtrl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clientgui/BOINCListCtrl.cpp b/clientgui/BOINCListCtrl.cpp index 7e8e6b2067..95fe961cb6 100644 --- a/clientgui/BOINCListCtrl.cpp +++ b/clientgui/BOINCListCtrl.cpp @@ -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);