# HG changeset patch # User koda # Date 1354456314 -3600 # Node ID e0c8fad9802257cf76d8b735b96c9ae32ea1852b # Parent 7834c251907041e125ab620eef83468ba7cfb51e resize the qt window to fill 2/3 of the screen size (no more crammed widgets on first launch) and always center it diff -r 7834c2519070 -r e0c8fad98022 QTfrontend/gameuiconfig.cpp --- 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()