0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-25 00:54:39 +03:00

Multiscreen initial size has been fixed

This commit is contained in:
Arin Alexander 2016-03-23 14:08:03 +03:00
parent 7e78790123
commit 9ad28f1aa6
2 changed files with 6 additions and 6 deletions

View File

@ -79,10 +79,10 @@ void PreviewReportWindow::restoreSetting()
if (v.isValid()){ if (v.isValid()){
restoreGeometry(v.toByteArray()); restoreGeometry(v.toByteArray());
} else { } else {
QDesktopWidget *desktop = QApplication::desktop(); QScreen *screen = QApplication::primaryScreen();
int screenWidth = desktop->width(); int screenWidth = screen->virtualGeometry().width();
int screenHeight = desktop->height(); int screenHeight = screen->virtualGeometry().height();
int x = screenWidth*0.1; int x = screenWidth*0.1;
int y = screenHeight*0.1; int y = screenHeight*0.1;

View File

@ -602,10 +602,10 @@ void ReportDesignWindow::restoreSetting()
if (v.isValid()){ if (v.isValid()){
restoreGeometry(v.toByteArray()); restoreGeometry(v.toByteArray());
} else { } else {
QDesktopWidget *desktop = QApplication::desktop(); QScreen *screen = QApplication::primaryScreen();
int screenWidth = desktop->width(); int screenWidth = screen->virtualGeometry().width();
int screenHeight = desktop->height(); int screenHeight = screen->virtualGeometry().height();
int x = screenWidth*0.1; int x = screenWidth*0.1;
int y = screenHeight*0.1; int y = screenHeight*0.1;