diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 9770f5270..c3014f42e 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -41,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -1866,7 +1866,7 @@ void PageView::mouseMoveEvent( QMouseEvent * e ) int deltaY = d->mouseMidLastY - mouseY; // wrap mouse from top to bottom - const QRect mouseContainer = KGlobalSettings::desktopGeometry( this ); + const QRect mouseContainer = QApplication::desktop()->screenGeometry( this ); const int absDeltaY = abs(deltaY); if ( absDeltaY > mouseContainer.height() / 2 ) { @@ -1953,7 +1953,7 @@ void PageView::mouseMoveEvent( QMouseEvent * e ) QPoint delta = d->mouseGrabPos - mousePos; // wrap mouse from top to bottom - const QRect mouseContainer = KGlobalSettings::desktopGeometry( this ); + const QRect mouseContainer = QApplication::desktop()->screenGeometry( this ); // If the delta is huge it probably means we just wrapped in that direction const QPoint absDelta(abs(delta.x()), abs(delta.y())); if ( absDelta.y() > mouseContainer.height() / 2 ) diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp index ac517f449..736b516d9 100644 --- a/ui/propertiesdialog.cpp +++ b/ui/propertiesdialog.cpp @@ -10,6 +10,8 @@ #include "propertiesdialog.h" // qt/kde includes +#include +#include #include #include #include @@ -27,7 +29,6 @@ #include #include #include -#include #include // local includes @@ -171,7 +172,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc) // width = qMax( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 ); width = qMax( width, page2Layout->sizeHint().width() + 31 ); // stay inside the 2/3 of the screen width - QRect screenContainer = KGlobalSettings::desktopGeometry( this ); + QRect screenContainer = QApplication::desktop()->screenGeometry( this ); width = qMin( width, 2*screenContainer.width()/3 ); resize(width, 1); diff --git a/ui/thumbnaillist.cpp b/ui/thumbnaillist.cpp index a01f5e1b8..dc4dd5f78 100644 --- a/ui/thumbnaillist.cpp +++ b/ui/thumbnaillist.cpp @@ -10,6 +10,8 @@ #include "thumbnaillist.h" // qt/kde includes +#include +#include #include #include #include @@ -22,7 +24,6 @@ #include #include #include -#include // local includes #include "pagepainter.h" @@ -848,7 +849,7 @@ void ThumbnailListPrivate::mouseMoveEvent( QMouseEvent * e ) m_mouseGrabItem = getPageByNumber( m_pageCurrentlyGrabbed ); } // wrap mouse from top to bottom - const QRect mouseContainer = KGlobalSettings::desktopGeometry( this ); + const QRect mouseContainer = QApplication::desktop()->screenGeometry( this ); QPoint currentMousePos = QCursor::pos(); if ( currentMousePos.y() <= mouseContainer.top() + 4 ) {