fix a couple of drawing defects

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-02-20 16:38:48 +00:00
parent c1b8f155dc
commit 9425b04cfd

View File

@@ -833,7 +833,7 @@ void MyImageDialog::OnPaint(wxPaintEvent& WXUNUSED(evt))
// paint a sort of progress bar with a 10px border: // paint a sort of progress bar with a 10px border:
dc.SetBrush(*wxRED_BRUSH); dc.SetBrush(*wxRED_BRUSH);
dc.DrawRectangle(10,10, 10+m_nCurrentProgress*(GUITHREAD_BMP_SIZE-20)/100,30); dc.DrawRectangle(10,10, m_nCurrentProgress*(sz.GetWidth()-20)/100,30);
dc.SetTextForeground(*wxBLUE); dc.SetTextForeground(*wxBLUE);
dc.DrawText(wxString::Format("%d%%", m_nCurrentProgress), dc.DrawText(wxString::Format("%d%%", m_nCurrentProgress),
(sz.GetWidth()-dc.GetCharWidth()*2)/2, (sz.GetWidth()-dc.GetCharWidth()*2)/2,
@@ -998,7 +998,7 @@ wxThread::ExitCode MyGUIThread::Entry()
// notify the dialog that another piece of our masterpiece is complete: // notify the dialog that another piece of our masterpiece is complete:
wxThreadEvent event( wxEVT_COMMAND_THREAD, GUITHREAD_EVENT ); wxThreadEvent event( wxEVT_COMMAND_THREAD, GUITHREAD_EVENT );
event.SetInt(i); event.SetInt(i+1);
wxQueueEvent( m_dlg, event.Clone() ); wxQueueEvent( m_dlg, event.Clone() );
// give the main thread the time to refresh before we lock the GUI mutex again // give the main thread the time to refresh before we lock the GUI mutex again