[PC-BSD Commits] r2225 - pcbsd/trunk/XGUISource

svn at pcbsd.org svn at pcbsd.org
Tue Jul 1 11:33:10 PDT 2008


Author: kris
Date: 2008-07-01 11:33:09 -0700 (Tue, 01 Jul 2008)
New Revision: 2225

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

Updated XGUI tool to have confirm dialog show up centered on screen



Modified: pcbsd/trunk/XGUISource/main.cpp
===================================================================
--- pcbsd/trunk/XGUISource/main.cpp	2008-07-01 17:28:03 UTC (rev 2224)
+++ pcbsd/trunk/XGUISource/main.cpp	2008-07-01 18:33:09 UTC (rev 2225)
@@ -65,6 +65,12 @@
 
         XGUI w;
 	dialogConfirm d;
+        QDesktopWidget *desk = a.desktop();
+        QRect dimensions = desk->screenGeometry();
+        int wid = dimensions.width();     // returns desktop width
+        int hig = dimensions.height();    // returns desktop height
+        d.setGeometry((wid/2) - (315/2), (hig/2) - (111/2), 315, 111);
+
         d.ProgramInit();
         d.setStyle(QStyleFactory::create( "Plastik" ));
         d.show();



More information about the Commits mailing list