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

svn at pcbsd.org svn at pcbsd.org
Fri Jun 20 06:42:45 PDT 2008


Author: kris
Date: 2008-06-20 06:42:45 -0700 (Fri, 20 Jun 2008)
New Revision: 2138

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

Fixed desktop centering on the PC-BSD install GUI



Modified: pcbsd/trunk/PCInstall/main.cpp
===================================================================
--- pcbsd/trunk/PCInstall/main.cpp	2008-06-20 13:40:17 UTC (rev 2137)
+++ pcbsd/trunk/PCInstall/main.cpp	2008-06-20 13:42:45 UTC (rev 2138)
@@ -81,16 +81,13 @@
     PCInstall w;
     a.setMainWidget( &w );
 
-    QDesktopWidget *desk = QApplication::desktop();
-    int wid = desk->width();     // returns desktop width
-    int hig = desk->height();    // returns desktop height
-
+    QDesktopWidget *desk = a.desktop();
+    QRect dimensions = desk->screenGeometry();
+    int wid = dimensions.width();     // returns desktop width
+    int hig = dimensions.height();    // returns desktop height
     w.setGeometry((wid/2) - (1000/2), (hig/2) - (740/2), 1000, 730);
     
-    //qApp = &a;
     w.ProgramInit(); 
-    w.setStyle(QStyleFactory::create( "Lipstik" ));
-    //w.showFullScreen();
     w.show();
     a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
    



More information about the Commits mailing list