diff options
Diffstat (limited to 'src/modules/setup/setupwizard.cpp')
| -rw-r--r-- | src/modules/setup/setupwizard.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp index 200b4c25e..1c9895126 100644 --- a/src/modules/setup/setupwizard.cpp +++ b/src/modules/setup/setupwizard.cpp @@ -658,8 +658,11 @@ KviSetupWizard::~KviSetupWizard() void KviSetupWizard::showEvent(QShowEvent *e) { - int w = QApplication::desktop()->width(); - int h = QApplication::desktop()->height(); + int primary_screen = g_pApp->desktop()->primaryScreen(); + QRect r = g_pApp->desktop()->screenGeometry(primary_screen); + + int w = r.width(); + int h = r.height(); int ww = width(); int wh = height(); @@ -672,9 +675,7 @@ void KviSetupWizard::showEvent(QShowEvent *e) if(ww < 770)ww = 770; } - //wh = sizeHint().height(); - - setGeometry((w - ww) / 2,(h - wh) / 2,ww,wh); + setGeometry(r.left() + (w - ww) / 2, r.top() + (h - wh) / 2,ww,wh); KviTalWizard::showEvent(e); } |
