QTfrontend/gameuiconfig.cpp
changeset 8887 539380a498e4
parent 8799 44e520374cfc
child 8833 c13ebed437cb
child 8902 a94c074fd483
child 8920 caa614af152d
equal deleted inserted replaced
8792:af4ab297b2b7 8887:539380a498e4
   215 }
   215 }
   216 
   216 
   217 void GameUIConfig::resizeToConfigValues()
   217 void GameUIConfig::resizeToConfigValues()
   218 {
   218 {
   219     // fill 2/3 of the screen desktop
   219     // fill 2/3 of the screen desktop
   220     const QRect deskSize = QApplication::desktop()->screenGeometry(-1);
   220     const QRect deskSize = HWApplication::desktop()->screenGeometry(-1);
   221     Form->resize(value("frontend/width", qMin(qMax(deskSize.width()*2/3,800),deskSize.width())).toUInt(),
   221     Form->resize(value("frontend/width", qMin(qMax(deskSize.width()*2/3,800),deskSize.width())).toUInt(),
   222                  value("frontend/height", qMin(qMax(deskSize.height()*2/3,600),deskSize.height())).toUInt());
   222                  value("frontend/height", qMin(qMax(deskSize.height()*2/3,600),deskSize.height())).toUInt());
   223 
   223 
   224     // move the window to the center of the screen
   224     // move the window to the center of the screen
   225     QPoint center = QApplication::desktop()->availableGeometry(-1).center();
   225     QPoint center = HWApplication::desktop()->availableGeometry(-1).center();
   226     center.setX(center.x() - (Form->width()/2));
   226     center.setX(center.x() - (Form->width()/2));
   227     center.setY(center.y() - (Form->height()/2));
   227     center.setY(center.y() - (Form->height()/2));
   228     Form->move(center);
   228     Form->move(center);
   229 }
   229 }
   230 
   230