cleanup a bit the wxSplashScreen code; don't Yield() on wxGTK as it's not needed at all (at least with GTK+ 2.12.9
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -147,7 +147,11 @@ bool MyApp::OnInit()
|
||||
6000, frame, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
|
||||
}
|
||||
|
||||
#if !defined(__WXGTK20__)
|
||||
// we don't need it at least on wxGTK with GTK+ 2.12.9
|
||||
wxYield();
|
||||
#endif
|
||||
|
||||
// and show it (the frames, unlike simple controls, are not shown when
|
||||
// created initially)
|
||||
@@ -220,14 +224,17 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
if (ok)
|
||||
{
|
||||
wxImage image = bitmap.ConvertToImage();
|
||||
|
||||
// do not scale on already small screens
|
||||
if (!m_isPda)
|
||||
image.Rescale( bitmap.GetWidth()/2, bitmap.GetHeight()/2 );
|
||||
|
||||
bitmap = wxBitmap(image);
|
||||
wxSplashScreen *splash = new wxSplashScreen(bitmap,
|
||||
wxSPLASH_CENTRE_ON_PARENT | wxSPLASH_NO_TIMEOUT,
|
||||
0, this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
|
||||
|
||||
wxWindow *win = splash->GetSplashWindow();
|
||||
#if wxUSE_MEDIACTRL
|
||||
wxMediaCtrl *media = new wxMediaCtrl( win, wxID_EXIT, _T("press.mpg"), wxPoint(2,2));
|
||||
@@ -235,7 +242,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
#else
|
||||
wxStaticText *text = new wxStaticText( win,
|
||||
wxID_EXIT,
|
||||
_T("click somewhere\non image"),
|
||||
_T("click somewhere\non this image"),
|
||||
wxPoint(m_isPda ? 0 : 13,
|
||||
m_isPda ? 0 : 11)
|
||||
);
|
||||
|
Reference in New Issue
Block a user