resize the qt window to fill 2/3 of the screen size (no more crammed widgets on first launch) and always center it
--- a/QTfrontend/gameuiconfig.cpp Sat Dec 01 19:57:57 2012 -0500
+++ b/QTfrontend/gameuiconfig.cpp Sun Dec 02 14:51:54 2012 +0100
@@ -179,7 +179,16 @@
void GameUIConfig::resizeToConfigValues()
{
- Form->resize(value("frontend/width", 800).toUInt(), value("frontend/height", 600).toUInt());
+ // fill 2/3 of the screen desktop
+ const QRect deskSize = QApplication::desktop()->screenGeometry(-1);
+ Form->resize(value("frontend/width", deskSize.width()*2/3).toUInt(),
+ value("frontend/height", deskSize.height()*2/3).toUInt());
+
+ // move the window to the center of the screen
+ QPoint center = QApplication::desktop()->availableGeometry(-1).center();
+ center.setX(center.x() - (Form->width()/2));
+ center.setY(center.y() - (Form->height()/2));
+ Form->move(center);
}
void GameUIConfig::SaveOptions()