Hello community, here is the log from the commit of package gwenview for openSUSE:Factory checked in at 2014-03-30 07:51:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gwenview (Old) and /work/SRC/openSUSE:Factory/.gwenview.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gwenview" Changes: -------- --- /work/SRC/openSUSE:Factory/gwenview/gwenview.changes 2014-03-18 16:06:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.gwenview.new/gwenview.changes 2014-03-30 09:52:16.000000000 +0200 @@ -1,0 +2,14 @@ +Thu Mar 27 17:41:30 UTC 2014 - [email protected] + +- Update to 4.12.97 + * KDE 4.13 RC release + * See http://www.kde.org/announcements/announce-4.13-rc.php + +------------------------------------------------------------------- +Thu Mar 20 18:07:27 UTC 2014 - [email protected] + +- Update to 4.12.95 + * KDE 4.13 Beta 3 release + * See http://www.kde.org/announcements/announce-4.13-beta3.php + +------------------------------------------------------------------- Old: ---- gwenview-4.12.90.tar.xz New: ---- gwenview-4.12.97.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gwenview.spec ++++++ --- /var/tmp/diff_new_pack.tHsuau/_old 2014-03-30 09:55:26.000000000 +0200 +++ /var/tmp/diff_new_pack.tHsuau/_new 2014-03-30 09:55:26.000000000 +0200 @@ -17,7 +17,7 @@ Name: gwenview -Version: 4.12.90 +Version: 4.12.97 Release: 0 Summary: Simple Image Viewer for KDE License: GPL-2.0+ ++++++ gwenview-4.12.90.tar.xz -> gwenview-4.12.97.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.12.90/lib/documentview/abstractimageview.cpp new/gwenview-4.12.97/lib/documentview/abstractimageview.cpp --- old/gwenview-4.12.90/lib/documentview/abstractimageview.cpp 2014-03-07 07:20:11.000000000 +0100 +++ new/gwenview-4.12.97/lib/documentview/abstractimageview.cpp 2014-03-20 09:46:44.000000000 +0100 @@ -31,29 +31,12 @@ // Qt #include <QCursor> #include <QGraphicsSceneMouseEvent> -#include <QApplication> namespace Gwenview { static const int UNIT_STEP = 16; -static void restoreAndSetOverrideCursor(const Qt::CursorShape& newShape) -{ - if (!QApplication::overrideCursor()) { - QApplication::setOverrideCursor(newShape); - return; - } - const Qt::CursorShape currentShape = QApplication::overrideCursor()->shape(); - if (newShape == currentShape) { - return; - } - while (QApplication::overrideCursor()) { - QApplication::restoreOverrideCursor(); - } - QApplication::setOverrideCursor(newShape); -} - struct AbstractImageViewPrivate { enum Verbosity { @@ -71,8 +54,7 @@ bool mZoomToFit; QPointF mImageOffset; QPointF mScrollPos; - QPointF mStartDragPos; - QPoint mScreenCenter; + QPointF mLastDragPos; void adjustImageOffset(Verbosity verbosity = Notify) { @@ -294,11 +276,6 @@ void AbstractImageView::mousePressEvent(QGraphicsSceneMouseEvent* event) { - if (event->button() == Qt::RightButton && !d->mStartDragPos.isNull()) { - QCursor::setPos(d->mStartDragPos.toPoint()); - d->mStartDragPos = QPointF(); - } - QGraphicsItem::mousePressEvent(event); if (event->button() == Qt::MiddleButton) { bool value = !zoomToFit(); @@ -319,51 +296,51 @@ } } - // Start panning if image is only partially visible and left mouse button is pressed - if (visibleImageSize() != documentSize() * zoom() && event->button() == Qt::LeftButton) { - d->mStartDragPos = QCursor::pos(); - QPointF screenCenter = event->screenPos() - event->pos() + QPointF(boundingRect().width()/2., boundingRect().height()/2.); - d->mScreenCenter = screenCenter.toPoint(); - QCursor::setPos(d->mScreenCenter); - } - + d->mLastDragPos = event->pos(); updateCursor(); } void AbstractImageView::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { QGraphicsItem::mouseMoveEvent(event); - updateCursor(); - // Don't pan if whole image is visible - if (visibleImageSize() == documentSize() * zoom()) { - return; - } + QPointF mousePos = event->pos(); + QPointF newScrollPos = d->mScrollPos + d->mLastDragPos - mousePos; - // Don't pan if Ctrl key is pressed - if (event->modifiers() & Qt::ControlModifier) { - return; - } - - int speed = 1; - if (event->modifiers() & Qt::ShiftModifier) { - speed = 4; - } - // delta has to be a QPoint (not a QPointF) - // otherwise d->setScrollPos will be slow. - QPoint delta = d->mScreenCenter - QCursor::pos(); - QPointF newScrollPos = d->mScrollPos + speed * delta; - QCursor::setPos(d->mScreenCenter); + // Wrap mouse pos + qreal maxWidth = boundingRect().width(); + qreal maxHeight = boundingRect().height(); + // We need a margin because if the window is maximized, the mouse may not + // be able to go past the bounding rect. + // The mouse get placed 1 pixel before/after the margin to avoid getting + // considered as needing to wrap the other way in next mouseMoveEvent + // (because we don't check the move vector) + const int margin = 5; + if (mousePos.x() <= margin) { + mousePos.setX(maxWidth - margin - 1); + } else if (mousePos.x() >= maxWidth - margin) { + mousePos.setX(margin + 1); + } + if (mousePos.y() <= margin) { + mousePos.setY(maxHeight - margin - 1); + } else if (mousePos.y() >= maxHeight - margin) { + mousePos.setY(margin + 1); + } + + // Set mouse pos (Hackish translation to screen coords!) + QPointF screenDelta = event->screenPos() - event->pos(); + QCursor::setPos((mousePos + screenDelta).toPoint()); + d->mLastDragPos = mousePos; d->setScrollPos(newScrollPos); + } void AbstractImageView::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { QGraphicsItem::mouseReleaseEvent(event); - if (!d->mStartDragPos.isNull()) { - QCursor::setPos(d->mStartDragPos.toPoint()); - d->mStartDragPos = QPointF(); + if (!d->mLastDragPos.isNull()) { + d->mLastDragPos = QPointF(); } updateCursor(); } @@ -433,8 +410,6 @@ return; } d->setScrollPos(d->mScrollPos + delta); - - updateCursor(); } void AbstractImageView::keyReleaseEvent(QKeyEvent* event) @@ -530,20 +505,12 @@ void AbstractImageView::updateCursor() { if (d->mControlKeyIsDown) { - QApplication::restoreOverrideCursor(); setCursor(d->mZoomCursor); } else { - if (d->mStartDragPos.isNull()) { - if (QApplication::mouseButtons() == Qt::LeftButton) { - restoreAndSetOverrideCursor(Qt::ClosedHandCursor); - } else { - QApplication::restoreOverrideCursor(); - setCursor(Qt::OpenHandCursor); - } + if (d->mLastDragPos.isNull()) { + setCursor(Qt::OpenHandCursor); } else { - if (visibleImageSize() != documentSize() * zoom()) { - restoreAndSetOverrideCursor(Qt::BlankCursor); - } + setCursor(Qt::ClosedHandCursor); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.12.90/lib/version.h new/gwenview-4.12.97/lib/version.h --- old/gwenview-4.12.90/lib/version.h 2014-03-07 07:20:11.000000000 +0100 +++ new/gwenview-4.12.97/lib/version.h 2014-03-20 09:46:44.000000000 +0100 @@ -33,6 +33,6 @@ https://bugs.kde.org/editversions.cgi?product=gwenview */ -#define GWENVIEW_VERSION "4.13.0 pre" +#define GWENVIEW_VERSION "4.13.0 beta3" #endif /* VERSION_H */ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
