From ea3b2e44618560a421520b09535881d83de2f16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miko=C5=82ajczyk?= Date: Mon, 14 Jul 2014 11:14:37 +0200 Subject: [PATCH 1/2] fix for issue #13 --- src/calamares/CalamaresApplication.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index b17c9fb18..e042db3b5 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -16,6 +16,8 @@ * along with Calamares. If not, see . */ +#include +#include #include "CalamaresApplication.h" #include "CalamaresWindow.h" @@ -193,6 +195,13 @@ CalamaresApplication::onPluginsReady() this, &CalamaresApplication::startPhase ); startPhase( Calamares::Prepare ); + m_mainwindow->setGeometry( + QStyle::alignedRect( + Qt::LeftToRight, + Qt::AlignCenter, + m_mainwindow->size(), + this->desktop()->availableGeometry() + )); } From 91e1f8248bb94fb4d2b38fbc3b6e668a0ebceb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miko=C5=82ajczyk?= Date: Mon, 14 Jul 2014 14:04:15 +0200 Subject: [PATCH 2/2] update for the fix, remove QStyle dependency --- src/calamares/CalamaresApplication.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index e042db3b5..5150f8287 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -15,8 +15,6 @@ * You should have received a copy of the GNU General Public License * along with Calamares. If not, see . */ - -#include #include #include "CalamaresApplication.h" @@ -195,13 +193,9 @@ CalamaresApplication::onPluginsReady() this, &CalamaresApplication::startPhase ); startPhase( Calamares::Prepare ); - m_mainwindow->setGeometry( - QStyle::alignedRect( - Qt::LeftToRight, - Qt::AlignCenter, - m_mainwindow->size(), - this->desktop()->availableGeometry() - )); + m_mainwindow->move( + this->desktop()->availableGeometry().center() - m_mainwindow->rect().center() + ); }