git-svn-id: svn://db.shs.com.ru/libs@956 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -58,20 +58,25 @@ AboutWindow::AboutWindow(QWidget * parent): QDialog(parent), ui(new Ui::AboutWin
|
|||||||
//ui->verticalSpacer->changeSize(1, 1, QSizePolicy::Preferred, QSizePolicy::Preferred);
|
//ui->verticalSpacer->changeSize(1, 1, QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOBILE_VIEW
|
#ifdef MOBILE_VIEW
|
||||||
ui->layoutMain->addSpacerItem(new QSpacerItem(1, 1, QSizePolicy::Preferred, QSizePolicy::Expanding));
|
// ui->layoutMain->addSpacerItem(new QSpacerItem(1, 1, QSizePolicy::Preferred, QSizePolicy::Expanding));
|
||||||
#else
|
#else
|
||||||
QScreen * scr =
|
QRect r;
|
||||||
# if QT_VERSION >= 0x050A00
|
# if QT_VERSION < 0x050000
|
||||||
QApplication::screenAt(QCursor::pos());
|
r = QApplication::desktop()->geometry();
|
||||||
# else
|
# else
|
||||||
|
QScreen * scr =
|
||||||
|
# if QT_VERSION >= 0x050A00
|
||||||
|
QApplication::screenAt(QCursor::pos());
|
||||||
|
# else
|
||||||
QApplication::screens()[0];
|
QApplication::screens()[0];
|
||||||
# endif
|
# endif
|
||||||
if (scr) {
|
if (scr) {
|
||||||
QRect r;
|
|
||||||
r.setSize(scr->availableSize() / 2);
|
r.setSize(scr->availableSize() / 2);
|
||||||
r.moveCenter(scr->availableGeometry().center());
|
r.moveCenter(scr->availableGeometry().center());
|
||||||
setGeometry(r);
|
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
if (r.isValid())
|
||||||
|
setGeometry(r);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user