equal
deleted
inserted
replaced
190 void GameUIConfig::resizeToConfigValues() |
190 void GameUIConfig::resizeToConfigValues() |
191 { |
191 { |
192 // fill 2/3 of the screen desktop |
192 // fill 2/3 of the screen desktop |
193 const QRect deskSize = QApplication::desktop()->screenGeometry(-1); |
193 const QRect deskSize = QApplication::desktop()->screenGeometry(-1); |
194 Form->resize(value("frontend/width", qMin(qMax(deskSize.width()*2/3,800),deskSize.width())).toUInt(), |
194 Form->resize(value("frontend/width", qMin(qMax(deskSize.width()*2/3,800),deskSize.width())).toUInt(), |
195 value("frontend/height", qMax(qMin(deskSize.height()*2/3,600),deskSize.height())).toUInt()); |
195 value("frontend/height", qMin(qMax(deskSize.height()*2/3,600),deskSize.height())).toUInt()); |
196 |
196 |
197 // move the window to the center of the screen |
197 // move the window to the center of the screen |
198 QPoint center = QApplication::desktop()->availableGeometry(-1).center(); |
198 QPoint center = QApplication::desktop()->availableGeometry(-1).center(); |
199 center.setX(center.x() - (Form->width()/2)); |
199 center.setX(center.x() - (Form->width()/2)); |
200 center.setY(center.y() - (Form->height()/2)); |
200 center.setY(center.y() - (Form->height()/2)); |