[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/krunner/interfaces/quicksand
From: Ryan P. Bitanga <rjpbitanga () yahoo ! com>
Date: 2009-05-14 5:04:00
Message-ID: 1242277440.848626.23488.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 967816 by rbitanga:
Center the quicksand dialog on the screen again
M +13 -0 qs_dialog.cpp
--- trunk/KDE/kdebase/workspace/krunner/interfaces/quicksand/qs_dialog.cpp #967815:967816
@@ -19,7 +19,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .
*/
+#include <QApplication>
#include <QBoxLayout>
+#include <QDesktopWidget>
#include <QLabel>
#include <QToolButton>
@@ -130,6 +132,17 @@
show();
m_matchView->setFocus();
+ int screen = 0;
+ if (QApplication::desktop()->numScreens() > 1) {
+ screen = QApplication::desktop()->screenNumber(QCursor::pos());
+ }
+
+ //KDialog::centerOnScreen(this, screen); // For some reason, this isn't working
+ QDesktopWidget *desktop = QApplication::desktop();
+ QRect r = desktop->screenGeometry(screen);
+ move(r.left() + (r.width() / 2) - (width() / 2),
+ r.top() + (r.height() / 2) - (height() / 2));
+
KWindowSystem::forceActiveWindow(winId());
if (term.isEmpty()) {
m_matchView->setTitle(QString());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic