diff --git a/checkin_notes b/checkin_notes index d8df07c29b..aceb9a04a0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2941,8 +2941,11 @@ Charlie 12 May 2011 Charlie 13 May 2011 - MGR: Fixes to new Simple GUI for Linux. - MGR: Fix logic to enable / disable Show Graphics in new Simple GUI. + - MGR: make sure new Simple GUI Pause / Resume button is large enough + for the larger of the localized words for Pause and Resume. clientgui/ + sg_BoincSimpleFrame.cpp sg_PanelBase.cpp, .h sg_ProjectPanel.cpp, .h sg_TaskCommandPopup.cpp, .h diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index 70fc279aef..be4cfb9cff 100755 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -605,9 +605,12 @@ CSimpleGUIPanel::CSimpleGUIPanel(wxWindow* parent) : int pauseWidth, resumeWidth, y; GetTextExtent(m_sPauseString, &pauseWidth, &y); GetTextExtent(m_sResumeString, &resumeWidth, &y); + + m_bisPaused = pauseWidth > resumeWidth; m_PauseResumeButton = new wxButton( this, ID_SGPAUSERESUMEBUTTON, - (pauseWidth > resumeWidth) ? m_sPauseString : m_sResumeString, + m_bisPaused ? m_sPauseString : m_sResumeString, wxDefaultPosition, wxDefaultSize, 0 ); + m_PauseResumeButton->SetToolTip(wxEmptyString); buttonsSizer->Add( m_PauseResumeButton, 0, wxEXPAND | wxALIGN_RIGHT, 0 ); buttonsSizer->AddStretchSpacer(); @@ -626,10 +629,6 @@ CSimpleGUIPanel::CSimpleGUIPanel(wxWindow* parent) : Layout(); mainSizer->Fit(GetParent()); - - m_bisPaused = false; - m_PauseResumeButton->SetLabel(m_sPauseString); - m_PauseResumeButton->SetToolTip(m_sPauseButtonToolTip); SetBackgroundBitmap(); @@ -741,7 +740,7 @@ void CSimpleGUIPanel::OnFrameRender() { pDoc->GetCoreClientStatus(status); isPaused = (RUN_MODE_NEVER == status.task_mode); - if (isPaused != m_bisPaused) { + if ((isPaused != m_bisPaused) || (!m_PauseResumeButton->IsEnabled())) { m_bisPaused = isPaused; m_PauseResumeButton->SetLabel(m_bisPaused ? m_sResumeString : m_sPauseString); m_PauseResumeButton->SetToolTip(m_bisPaused ? m_sResumeButtonToolTip : m_sPauseButtonToolTip);