mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
Port away from KGlobalSettings::desktopGeometry().
This commit is contained in:
parent
a6db7a2655
commit
dc74543bac
|
@ -33,6 +33,7 @@
|
|||
#include <qclipboard.h>
|
||||
#include <qmenu.h>
|
||||
#include <QInputDialog>
|
||||
#include <qdesktopwidget.h>
|
||||
|
||||
#include <kaction.h>
|
||||
#include <kactionmenu.h>
|
||||
|
@ -41,7 +42,6 @@
|
|||
#include <klocale.h>
|
||||
#include <kfiledialog.h>
|
||||
#include <kglobal.h>
|
||||
#include <kglobalsettings.h>
|
||||
#include <kselectaction.h>
|
||||
#include <ktoggleaction.h>
|
||||
#include <QtCore/QDebug>
|
||||
|
@ -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 )
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include "propertiesdialog.h"
|
||||
|
||||
// qt/kde includes
|
||||
#include <qapplication.h>
|
||||
#include <qdesktopwidget.h>
|
||||
#include <qfile.h>
|
||||
#include <qlayout.h>
|
||||
#include <qformlayout.h>
|
||||
|
@ -27,7 +29,6 @@
|
|||
#include <klocale.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <ksqueezedtextlabel.h>
|
||||
#include <kglobalsettings.h>
|
||||
#include <kurl.h>
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include "thumbnaillist.h"
|
||||
|
||||
// qt/kde includes
|
||||
#include <qapplication.h>
|
||||
#include <qdesktopwidget.h>
|
||||
#include <qevent.h>
|
||||
#include <qtimer.h>
|
||||
#include <qpainter.h>
|
||||
|
@ -22,7 +24,6 @@
|
|||
#include <kiconloader.h>
|
||||
#include <kactioncollection.h>
|
||||
#include <kicon.h>
|
||||
#include <kglobalsettings.h>
|
||||
|
||||
// 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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue