equal
deleted
inserted
replaced
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 |