diff --git a/clientgui/BOINCTaskCtrl.cpp b/clientgui/BOINCTaskCtrl.cpp index 8cac2104cf..d180a8b534 100644 --- a/clientgui/BOINCTaskCtrl.cpp +++ b/clientgui/BOINCTaskCtrl.cpp @@ -188,9 +188,8 @@ wxInt32 CBOINCTaskCtrl::UpdateControls() { if (!pItem->m_pButton) { pItem->m_pButton = new wxButton; pItem->m_strNameEllipsed = pItem->m_strName; - pItem->m_pButton->Create(this, pItem->m_iEventID, wxEmptyString, wxDefaultPosition, wxSize(TASKBUTTONWIDTH, -1), 0); EllipseStringIfNeeded(pItem->m_strNameEllipsed, pItem->m_pButton); - pItem->m_pButton->SetLabel(pItem->m_strNameEllipsed); + pItem->m_pButton->Create(this, pItem->m_iEventID, pItem->m_strNameEllipsed, wxDefaultPosition, wxSize(TASKBUTTONWIDTH, -1), 0); pItem->m_pButton->SetHelpText(pItem->m_strDescription); #if wxUSE_TOOLTIPS pItem->m_pButton->SetToolTip(pItem->m_strName + wxT(": ") + pItem->m_strDescription); @@ -254,8 +253,7 @@ bool CBOINCTaskCtrl::OnRestoreState(wxConfigBase* pConfig) { void CBOINCTaskCtrl::EllipseStringIfNeeded(wxString& s, wxWindow *win) { int w, h; - wxSize sz = win->GetSize(); - int maxWidth = sz.GetWidth() - 10; + int maxWidth = TASKBUTTONWIDTH - 10; win->GetTextExtent(s, &w, &h);