Patch #1762 2006-12-27 02:01
stahta01
CentreOnScreen patch for wxWidgets 2.8- Download
- 1762-CentreOnScreen.patch (1.4 KB)
Index: src/sdk/globals.cpp
===================================================================
--- src/sdk/globals.cpp (revision 3426)
+++ src/sdk/globals.cpp (working copy)
@@ -762,7 +762,11 @@
if(w->GetParent())
w->CentreOnParent(); // poo!
else
+#if wxCHECK_VERSION(2, 8, 0)
+ w->Centre(wxBOTH | wxCENTRE_ON_SCREEN);
+#else
w->CentreOnScreen();
+#endif
return;
}
Index: src/plugins/compilergcc/compileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/compileroptionsdlg.cpp (revision 3426)
+++ src/plugins/compilergcc/compileroptionsdlg.cpp (working copy)
@@ -344,7 +344,11 @@
this->SetSizeHints(min_width+140,min_height,-1,-1);
#endif
this->SetSize(-1, -1, 0, 0);
+#if wxCHECK_VERSION(2, 8, 0)
+ this->Centre(wxBOTH | wxCENTRE_ON_SCREEN);
+#else
this->CentreOnScreen();
+#endif
} // end of constructor
CompilerOptionsDlg::~CompilerOptionsDlg()
Index: src/src/splashscreen.cpp
===================================================================
--- src/src/splashscreen.cpp (revision 3426)
+++ src/src/splashscreen.cpp (working copy)
@@ -100,7 +100,11 @@
int h = label.GetHeight();
SetClientSize(w, h);
+#if wxCHECK_VERSION(2, 8, 0)
+ Centre(wxBOTH | wxCENTRE_ON_SCREEN);
+#else
CentreOnScreen();
+#endif
#ifndef __WXMAC__
int x = GetPosition().x;
History
stahta01 2006-12-27 02:05
Problem: CentreOnScreen no longer supported by class wxWindow.
Solution: Changed CentreOnScreen to
Centre(wxBOTH | wxCENTRE_ON_SCREEN)
Tim S
killerbot 2006-12-27 13:03
applied : rev 3433
thomasdenk 2007-03-23 16:55
reverted: rev 3747