mirror of https://github.com/BOINC/boinc.git
MGR: make sure new Simple GUI Pause / Resume button is large enough for the larger of the localized words for Pause and Resume
svn path=/trunk/boinc/; revision=23536
This commit is contained in:
parent
25ac4ea160
commit
7c8f41ac18
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue