[PC-BSD Commits] r711 - pcbsd/trunk/PCInstall

svn at pcbsd.org svn at pcbsd.org
Wed Sep 12 20:08:47 PDT 2007


Author: kris
Date: 2007-09-12 20:08:47 -0700 (Wed, 12 Sep 2007)
New Revision: 711

Modified:
   pcbsd/trunk/PCInstall/main.cpp
Log:

Added more effective fix to window centering for the PCInstall program



Modified: pcbsd/trunk/PCInstall/main.cpp
===================================================================
--- pcbsd/trunk/PCInstall/main.cpp	2007-09-13 02:12:28 UTC (rev 710)
+++ pcbsd/trunk/PCInstall/main.cpp	2007-09-13 03:08:47 UTC (rev 711)
@@ -35,7 +35,12 @@
     
     PCInstall w;
     a.setMainWidget( &w );
-    //w.setGeometry(64, 48, 896, 672);
+
+    QDesktopWidget *desk = QApplication::desktop();
+    int wid = desk->width();     // returns desktop width
+    int hig = desk->height();    // returns desktop height
+
+    w.setGeometry((wid/2) - (896/2), (hig/2) - (672/2), 896, 672);
     
     qApp = &a;
     w.ProgramInit(); 



More information about the Commits mailing list