From 9ad28f1aa6fd45cea3757eca73a93fb8e93e94a3 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 23 Mar 2016 14:08:03 +0300 Subject: [PATCH] Multiscreen initial size has been fixed --- limereport/lrpreviewreportwindow.cpp | 6 +++--- limereport/lrreportdesignwindow.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/limereport/lrpreviewreportwindow.cpp b/limereport/lrpreviewreportwindow.cpp index e024d28..7abea25 100644 --- a/limereport/lrpreviewreportwindow.cpp +++ b/limereport/lrpreviewreportwindow.cpp @@ -79,10 +79,10 @@ void PreviewReportWindow::restoreSetting() if (v.isValid()){ restoreGeometry(v.toByteArray()); } else { - QDesktopWidget *desktop = QApplication::desktop(); + QScreen *screen = QApplication::primaryScreen(); - int screenWidth = desktop->width(); - int screenHeight = desktop->height(); + int screenWidth = screen->virtualGeometry().width(); + int screenHeight = screen->virtualGeometry().height(); int x = screenWidth*0.1; int y = screenHeight*0.1; diff --git a/limereport/lrreportdesignwindow.cpp b/limereport/lrreportdesignwindow.cpp index b90c5f9..0edf33c 100644 --- a/limereport/lrreportdesignwindow.cpp +++ b/limereport/lrreportdesignwindow.cpp @@ -602,10 +602,10 @@ void ReportDesignWindow::restoreSetting() if (v.isValid()){ restoreGeometry(v.toByteArray()); } else { - QDesktopWidget *desktop = QApplication::desktop(); + QScreen *screen = QApplication::primaryScreen(); - int screenWidth = desktop->width(); - int screenHeight = desktop->height(); + int screenWidth = screen->virtualGeometry().width(); + int screenHeight = screen->virtualGeometry().height(); int x = screenWidth*0.1; int y = screenHeight*0.1;