![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package gwenview for openSUSE:Factory checked in at 2012-03-12 20:12:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gwenview (Old)
and /work/SRC/openSUSE:Factory/.gwenview.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gwenview", Maintainer is "kde-maintainers@suse.de"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gwenview/gwenview.changes 2012-01-27 15:17:39.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gwenview.new/gwenview.changes 2012-03-12 20:13:53.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Mar 2 23:12:14 CET 2012 - dmueller@suse.de
+
+- update to 4.8.1
+ * see http://kde.org/announcements/changelogs/changelog4_8_0to4_8_1.php for details
+
+-------------------------------------------------------------------
Old:
----
gwenview-4.8.0.tar.bz2
New:
----
gwenview-4.8.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gwenview.spec ++++++
--- /var/tmp/diff_new_pack.HhkSdT/_old 2012-03-12 20:13:55.000000000 +0100
+++ /var/tmp/diff_new_pack.HhkSdT/_new 2012-03-12 20:13:55.000000000 +0100
@@ -15,8 +15,9 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: gwenview
-Version: 4.8.0
+Version: 4.8.1
Release: 0
Summary: Simple Image Viewer for KDE
License: GPL-2.0+
++++++ gwenview-4.8.0.tar.bz2 -> gwenview-4.8.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/app/advancedconfigpage.ui new/gwenview-4.8.1/app/advancedconfigpage.ui
--- old/gwenview-4.8.0/app/advancedconfigpage.ui 2011-07-27 20:42:11.000000000 +0200
+++ new/gwenview-4.8.1/app/advancedconfigpage.ui 2012-02-29 23:57:15.000000000 +0100
@@ -48,8 +48,7 @@
<item row="1" column="1">
<widget class="QLabel" name="cacheHelpLabel">
<property name="text">
- <string>Enable this option if you do not have a lot of disk space.
-Be careful: this will delete the folder named <filename>.thumbnails</filename> in your home folder, deleting all thumbnails previously generated by Gwenview and other applications.</string>
+ <string>Enable this option if you do not have a lot of disk space.<br/><br/><em>Be careful:</em> this will delete the folder named <filename>.thumbnails</filename> in your home folder, deleting all thumbnails previously generated by Gwenview and other applications.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Files old/gwenview-4.8.0/doc/index.cache.bz2 and new/gwenview-4.8.1/doc/index.cache.bz2 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/doc/index.docbook new/gwenview-4.8.1/doc/index.docbook
--- old/gwenview-4.8.0/doc/index.docbook 2011-12-20 20:14:04.000000000 +0100
+++ new/gwenview-4.8.1/doc/index.docbook 2012-02-29 23:57:15.000000000 +0100
@@ -38,8 +38,8 @@
</copyright>
<legalnotice>&FDLNotice;</legalnotice>
-<date>2011-12-02</date>
-<releaseinfo>2.7.0 (&kde; 4.8)</releaseinfo>
+<date>2012-01-28</date>
+<releaseinfo>2.8 (&kde; 4.8)</releaseinfo>
<abstract>
<para>&kappname; is an image viewer for &kde;.</para>
</abstract>
@@ -60,7 +60,7 @@
<title>What is &kappname;</title>
<para>
-&kappname; is a fast and easy to use image viewer for KDE.
+&kappname; is a fast and easy to use image and video viewer for KDE.
</para>
<para>
@@ -227,7 +227,14 @@
button are next to the zoom slider and are two preset zoom levels. The
<guibutton>Fit</guibutton> button zooms the current image to fit the size
of the window, and the <guibutton>100%</guibutton> button zooms the image to
-the actual pixel size.</para>
+the actual pixel size. The shortcut <keycap>F</keycap> toggles between both view modes.</para>
+
+<para>When an image is in zoom-to-fit mode, you can go to the previous and next
+image with the arrow keys. When you zoom in, arrow keys are used to scroll the image.
+This is very similar to the behavior provided by phones or digital cameras.</para>
+
+<para>When an image is zoomed in, a bird-eye view appears and lets you scroll
+the image using the mouse and the arrow keys.</para>
<tip><para>You can start directly in View mode by starting &kappname; from a
context menu like <guimenuitem>Open With</guimenuitem> in another program or by
@@ -544,6 +551,12 @@
<listitem><para><keycombo
action="simul">&Ctrl;<keycap>O</keycap></keycombo>:
Open an image using the standard file selection dialog.</para></listitem>
+
+<listitem><para><keycap>F</keycap>:
+Pressing this shortcut toggles zoom-to-fit on and off.</para></listitem>
+
+<listitem><para><keycap>P</keycap>:
+Viewing a video this shortcut toggles playback on and off.</para></listitem>
</itemizedlist>
</sect1>
</chapter>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/importer/gwenview_importer.desktop new/gwenview-4.8.1/importer/gwenview_importer.desktop
--- old/gwenview-4.8.0/importer/gwenview_importer.desktop 2012-01-10 15:15:44.000000000 +0100
+++ new/gwenview-4.8.1/importer/gwenview_importer.desktop 2012-02-29 23:57:15.000000000 +0100
@@ -8,6 +8,7 @@
Exec=gwenview_importer %f
Icon=gwenview
Name=Download Photos with Gwenview
+Name[ar]=نزل الصور بجوينفيو
Name[ast]=Descarga Semeyes con Gwenview
Name[bg]=Изтегляне на снимки с Gwenview
Name[bs]=Preuzimanje fotografija Gvenvjuom
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/importer/gwenview_importer_camera.desktop new/gwenview-4.8.1/importer/gwenview_importer_camera.desktop
--- old/gwenview-4.8.0/importer/gwenview_importer_camera.desktop 2012-01-10 15:15:44.000000000 +0100
+++ new/gwenview-4.8.1/importer/gwenview_importer_camera.desktop 2012-02-29 23:57:15.000000000 +0100
@@ -7,6 +7,7 @@
Exec=gwenview_importer camera:/
Icon=gwenview
Name=Download Photos with Gwenview
+Name[ar]=نزل الصور بجوينفيو
Name[ast]=Descarga Semeyes con Gwenview
Name[bg]=Изтегляне на снимки с Gwenview
Name[bs]=Preuzimanje fotografija Gvenvjuom
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/CMakeLists.txt new/gwenview-4.8.1/lib/CMakeLists.txt
--- old/gwenview-4.8.0/lib/CMakeLists.txt 2012-01-02 20:53:00.000000000 +0100
+++ new/gwenview-4.8.1/lib/CMakeLists.txt 2012-02-29 23:57:15.000000000 +0100
@@ -7,7 +7,12 @@
set(jpeglib_version ${CMAKE_MATCH_1})
if ("${jpeglib_version}" STREQUAL "")
# libjpeg-turbo keeps JPEG_LIB_VERSION in jconfig.h, not jpeglib.h :/
- file(READ "${JPEG_INCLUDE_DIR}/jconfig.h" jconfig_h_content)
+ find_file(JCONFIG_H jconfig.h PATHS "${JPEG_INCLUDE_DIR}")
+ if (NOT EXISTS "${JCONFIG_H}")
+ message(FATAL_ERROR "Could not find jconfig.h. You can specify its path with -DJCONFIG_H=/path/to/jconfig.h.")
+ endif (NOT EXISTS "${JCONFIG_H}")
+ message(STATUS "Looking for libjpeg version in ${JCONFIG_H}")
+ file(READ "${JCONFIG_H}" jconfig_h_content)
string(REGEX MATCH "#define +JPEG_LIB_VERSION +([0-9]+)" "\\1" jpeglib_version "${jconfig_h_content}")
set(jpeglib_version ${CMAKE_MATCH_1})
endif ("${jpeglib_version}" STREQUAL "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/crop/croptool.cpp new/gwenview-4.8.1/lib/crop/croptool.cpp
--- old/gwenview-4.8.0/lib/crop/croptool.cpp 2011-12-20 20:14:04.000000000 +0100
+++ new/gwenview-4.8.1/lib/crop/croptool.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -207,6 +207,14 @@
QObject::connect(mCropWidget, SIGNAL(done()),
q, SIGNAL(done()));
}
+
+ QRect computeVisibleImageRect() const
+ {
+ RasterImageView* view = q->imageView();
+ const QRect imageRect = QRect(QPoint(0, 0), view->documentSize().toSize());
+ const QRect viewportRect = view->mapToImage(view->rect().toRect());
+ return imageRect & viewportRect;
+ }
};
CropTool::CropTool(RasterImageView* view)
@@ -216,11 +224,8 @@
d->q = this;
d->mCropHandleList << CH_Left << CH_Right << CH_Top << CH_Bottom << CH_TopLeft << CH_TopRight << CH_BottomLeft << CH_BottomRight;
d->mMovingHandle = CH_None;
- const QRect imageRect = QRect(QPoint(0, 0), view->documentSize().toSize());
- const QRect viewportRect = view->mapToImage(view->rect().toRect());
- d->mRect = imageRect & viewportRect;
d->mCropRatio = 0.;
-
+ d->mRect = d->computeVisibleImageRect();
d->setupWidget();
}
@@ -238,9 +243,10 @@
void CropTool::setRect(const QRect& rect)
{
+ QRect oldRect = d->mRect;
d->mRect = rect;
d->keepRectInsideImage();
- if (d->mRect != rect) {
+ if (d->mRect != oldRect) {
rectUpdated(d->mRect);
}
imageView()->update();
@@ -410,4 +416,9 @@
return d->mCropWidget;
}
+void CropTool::onWidgetSlidedIn()
+{
+ setRect(d->computeVisibleImageRect());
+}
+
} // namespace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/crop/croptool.h new/gwenview-4.8.1/lib/crop/croptool.h
--- old/gwenview-4.8.0/lib/crop/croptool.h 2011-12-02 22:32:06.000000000 +0100
+++ new/gwenview-4.8.1/lib/crop/croptool.h 2012-02-29 23:57:15.000000000 +0100
@@ -63,6 +63,9 @@
virtual QWidget* widget() const;
+public Q_SLOTS:
+ void onWidgetSlidedIn(); // reimp
+
Q_SIGNALS:
void rectUpdated(const QRect&);
void done();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/documentview/abstractrasterimageviewtool.cpp new/gwenview-4.8.1/lib/documentview/abstractrasterimageviewtool.cpp
--- old/gwenview-4.8.0/lib/documentview/abstractrasterimageviewtool.cpp 2011-12-20 20:14:04.000000000 +0100
+++ new/gwenview-4.8.1/lib/documentview/abstractrasterimageviewtool.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -19,7 +19,7 @@
*/
// Self
-#include "abstractrasterimageviewtool.h"
+#include "abstractrasterimageviewtool.moc"
// Qt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/documentview/abstractrasterimageviewtool.h new/gwenview-4.8.1/lib/documentview/abstractrasterimageviewtool.h
--- old/gwenview-4.8.0/lib/documentview/abstractrasterimageviewtool.h 2011-12-20 20:14:04.000000000 +0100
+++ new/gwenview-4.8.1/lib/documentview/abstractrasterimageviewtool.h 2012-02-29 23:57:15.000000000 +0100
@@ -44,6 +44,7 @@
struct AbstractRasterImageViewToolPrivate;
class GWENVIEWLIB_EXPORT AbstractRasterImageViewTool : public QObject
{
+ Q_OBJECT
public:
AbstractRasterImageViewTool(RasterImageView* view);
virtual ~AbstractRasterImageViewTool();
@@ -78,6 +79,10 @@
return 0;
}
+public Q_SLOTS:
+ virtual void onWidgetSlidedIn()
+ {}
+
private:
AbstractRasterImageViewToolPrivate * const d;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/documentview/birdeyeview.cpp new/gwenview-4.8.1/lib/documentview/birdeyeview.cpp
--- old/gwenview-4.8.0/lib/documentview/birdeyeview.cpp 2012-01-02 20:53:00.000000000 +0100
+++ new/gwenview-4.8.1/lib/documentview/birdeyeview.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -29,6 +29,7 @@
#include <KDebug>
// Qt
+#include <QApplication>
#include <QCursor>
#include <QGraphicsSceneEvent>
#include <QPainter>
@@ -36,9 +37,16 @@
namespace Gwenview
{
-static qreal MAX_SIZE = 96;
-static qreal VIEW_OFFSET = MAX_SIZE / 4;
-static qreal Y_POSITION_PERCENT = 1 / 3.;
+static qreal MIN_SIZE = 72;
+static qreal VIEW_OFFSET = MIN_SIZE / 4;
+
+/**
+ * Returns a QRectF whose coordinates are rounded to completely contains rect
+ */
+inline QRectF alignedRectF(const QRectF& rect)
+{
+ return QRectF(rect.toAlignedRect());
+}
struct BirdEyeViewPrivate
{
@@ -77,22 +85,26 @@
void BirdEyeView::adjustGeometry()
{
+ kDebug();
if (!d->mDocView->canZoom() || d->mDocView->zoomToFit()) {
hide();
return;
}
show();
QSize size = d->mDocView->document()->size();
- size.scale(MAX_SIZE, MAX_SIZE, Qt::KeepAspectRatio);
- QRectF rect = d->mDocView->boundingRect();
- setGeometry(
- QRectF(
- rect.right() - VIEW_OFFSET - size.width(),
- qMax(rect.top() + rect.height() * Y_POSITION_PERCENT - size.height(), qreal(0.)),
- size.width(),
- size.height()
- ));
+ size.scale(MIN_SIZE, MIN_SIZE, Qt::KeepAspectRatioByExpanding);
+ QRectF docViewRect = d->mDocView->boundingRect();
+ QRectF geom = QRectF(
+ QApplication::isRightToLeft()
+ ? docViewRect.left() + VIEW_OFFSET
+ : docViewRect.right() - VIEW_OFFSET - size.width(),
+ docViewRect.bottom() - VIEW_OFFSET - size.height(),
+ size.width(),
+ size.height()
+ );
+ setGeometry(alignedRectF(geom));
adjustVisibleRect();
+
setVisible(d->mVisibleRect != boundingRect());
}
@@ -106,9 +118,10 @@
return;
}
- d->mVisibleRect = QRectF(
- QPointF(d->mDocView->position()) / viewZoom * bevZoom,
- (d->mDocView->size() / viewZoom).boundedTo(docSize) * bevZoom);
+ QRectF rect = QRectF(
+ QPointF(d->mDocView->position()) / viewZoom * bevZoom,
+ (d->mDocView->size() / viewZoom).boundedTo(docSize) * bevZoom);
+ d->mVisibleRect = alignedRectF(rect);
update();
}
@@ -120,8 +133,7 @@
fg.setAlphaF(.66);
painter->setPen(fg);
painter->setBrush(bg);
- // Use a QRect to avoid missing pixels in the corners
- painter->drawRect(rect.toRect().adjusted(0, 0, -1, -1));
+ painter->drawRect(rect.adjusted(0, 0, -1, -1));
}
void BirdEyeView::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/documentview/documentview.cpp new/gwenview-4.8.1/lib/documentview/documentview.cpp
--- old/gwenview-4.8.0/lib/documentview/documentview.cpp 2012-01-10 15:15:44.000000000 +0100
+++ new/gwenview-4.8.1/lib/documentview/documentview.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -23,6 +23,7 @@
// Qt
#include <QAbstractScrollArea>
+#include <QApplication>
#include <QGraphicsLinearLayout>
#include <QGraphicsProxyWidget>
#include <QGraphicsScene>
@@ -529,16 +530,25 @@
}
return;
}
- if (event->modifiers() == Qt::NoModifier
- && GwenviewConfig::mouseWheelBehavior() == MouseWheelBehavior::Browse
- ) {
+ if (GwenviewConfig::mouseWheelBehavior() == MouseWheelBehavior::Browse
+ && event->modifiers() == Qt::NoModifier) {
// Browse with mouse wheel
if (event->delta() > 0) {
previousImageRequested();
} else {
nextImageRequested();
}
+ return;
+ }
+ // Scroll
+ qreal dx = 0;
+ // 16 = pixels for one line
+ // 120: see QWheelEvent::delta() doc
+ qreal dy = -qApp->wheelScrollLines() * 16 * event->delta() / 120;
+ if (event->orientation() == Qt::Horizontal) {
+ qSwap(dx, dy);
}
+ d->mAdapter->setScrollPos(d->mAdapter->scrollPos() + QPointF(dx, dy));
}
void DocumentView::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/documentview/documentviewcontroller.cpp new/gwenview-4.8.1/lib/documentview/documentviewcontroller.cpp
--- old/gwenview-4.8.0/lib/documentview/documentviewcontroller.cpp 2012-01-02 20:53:00.000000000 +0100
+++ new/gwenview-4.8.1/lib/documentview/documentviewcontroller.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -250,6 +250,11 @@
}
AbstractRasterImageViewTool* tool = d->mView->currentTool();
if (tool && tool->widget()) {
+ // Use a QueuedConnection to ensure the size of the view has been
+ // updated by the time the slot is called.
+ connect(d->mToolContainer, SIGNAL(slidedIn()),
+ tool, SLOT(onWidgetSlidedIn()),
+ Qt::QueuedConnection);
d->mToolContainerContent->setToolWidget(tool->widget());
d->mToolContainer->slideIn();
} else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/graphicshudslider.cpp new/gwenview-4.8.1/lib/graphicshudslider.cpp
--- old/gwenview-4.8.0/lib/graphicshudslider.cpp 2012-01-02 20:53:00.000000000 +0100
+++ new/gwenview-4.8.1/lib/graphicshudslider.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -54,6 +54,11 @@
QRectF mHandleRect;
+ bool hasValidRange() const
+ {
+ return mMax > mMin;
+ }
+
void updateHandleRect()
{
static const FullScreenTheme::RenderInfo renderInfo = FullScreenTheme::renderInfo(FullScreenTheme::SliderWidgetHandle);
@@ -105,6 +110,7 @@
d->mSliderPosition = d->mValue = 0;
d->mIsDown = false;
d->mRepeatAction = QAbstractSlider::SliderNoAction;
+ d->updateHandleRect();
setCursor(Qt::ArrowCursor);
setAcceptHoverEvents(true);
setFocusPolicy(Qt::WheelFocus);
@@ -117,8 +123,9 @@
void GraphicsHudSlider::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget*)
{
+ bool drawHandle = d->hasValidRange();
FullScreenTheme::State state;
- if (option->state.testFlag(QStyle::State_MouseOver)) {
+ if (drawHandle && option->state.testFlag(QStyle::State_MouseOver)) {
state = d->mIsDown ? FullScreenTheme::DownState : FullScreenTheme::MouseOverState;
} else {
state = FullScreenTheme::NormalState;
@@ -138,12 +145,17 @@
2 * renderInfo.borderRadius
);
- // Clip out handle
- QPainterPath clipPath;
- clipPath.addRect(QRectF(QPointF(0, 0), d->mHandleRect.bottomLeft()).adjusted(0, 0, 1, 0));
- clipPath.addRect(QRectF(d->mHandleRect.topRight(), sliderRect.bottomRight()).adjusted(-1, 0, 0, 0));
- painter->setClipPath(clipPath);
+ if (drawHandle) {
+ // Clip out handle
+ QPainterPath clipPath;
+ clipPath.addRect(QRectF(QPointF(0, 0), d->mHandleRect.bottomLeft()).adjusted(0, 0, 1, 0));
+ clipPath.addRect(QRectF(d->mHandleRect.topRight(), sliderRect.bottomRight()).adjusted(-1, 0, 0, 0));
+ painter->setClipPath(clipPath);
+ }
painter->drawRoundedRect(grooveRect.adjusted(.5, .5, -.5, -.5), renderInfo.borderRadius, renderInfo.borderRadius);
+ if (!drawHandle) {
+ return;
+ }
painter->setClipping(false);
// Handle
@@ -155,6 +167,9 @@
void GraphicsHudSlider::mousePressEvent(QGraphicsSceneMouseEvent* event)
{
+ if (!d->hasValidRange()) {
+ return;
+ }
const int pos = d->positionForX(event->pos().x());
if (d->mHandleRect.contains(event->pos())) {
switch (event->button()) {
@@ -180,6 +195,9 @@
void GraphicsHudSlider::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
{
+ if (!d->hasValidRange()) {
+ return;
+ }
if (d->mIsDown) {
setSliderPosition(d->positionForX(event->pos().x()));
triggerAction(QAbstractSlider::SliderMove);
@@ -189,6 +207,9 @@
void GraphicsHudSlider::mouseReleaseEvent(QGraphicsSceneMouseEvent* /*event*/)
{
+ if (!d->hasValidRange()) {
+ return;
+ }
d->mIsDown = false;
d->mRepeatAction = QAbstractSlider::SliderNoAction;
update();
@@ -196,6 +217,9 @@
void GraphicsHudSlider::wheelEvent(QGraphicsSceneWheelEvent* event)
{
+ if (!d->hasValidRange()) {
+ return;
+ }
int step = qMin(QApplication::wheelScrollLines() * d->mSingleStep, d->mPageStep);
if ((event->modifiers() & Qt::ControlModifier) || (event->modifiers() & Qt::ShiftModifier)) {
step = d->mPageStep;
@@ -206,6 +230,9 @@
void GraphicsHudSlider::keyPressEvent(QKeyEvent* event)
{
+ if (!d->hasValidRange()) {
+ return;
+ }
bool rtl = QApplication::isRightToLeft();
switch (event->key()) {
case Qt::Key_Left:
@@ -234,6 +261,9 @@
void GraphicsHudSlider::keyReleaseEvent(QKeyEvent* /*event*/)
{
+ if (!d->hasValidRange()) {
+ return;
+ }
d->mRepeatAction = QAbstractSlider::SliderNoAction;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/mimetypeutils.cpp new/gwenview-4.8.1/lib/mimetypeutils.cpp
--- old/gwenview-4.8.0/lib/mimetypeutils.cpp 2011-12-20 20:14:04.000000000 +0100
+++ new/gwenview-4.8.1/lib/mimetypeutils.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -68,6 +68,10 @@
if (list.isEmpty()) {
list = KImageIO::mimeTypes(KImageIO::Reading);
resolveAliasInList(&list);
+ // We don't want svg images to be considered as raster images
+ Q_FOREACH(const QString& mimeType, svgImageMimeTypes()) {
+ list.removeOne(mimeType);
+ }
}
return list;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/slidecontainer.cpp new/gwenview-4.8.1/lib/slidecontainer.cpp
--- old/gwenview-4.8.0/lib/slidecontainer.cpp 2011-12-20 20:14:04.000000000 +0100
+++ new/gwenview-4.8.1/lib/slidecontainer.cpp 2012-02-29 23:57:15.000000000 +0100
@@ -68,6 +68,7 @@
anim->setStartValue(slideHeight());
anim->setEndValue(newHeight);
anim->start(QAbstractAnimation::DeleteWhenStopped);
+ connect(anim, SIGNAL(finished()), SLOT(slotAnimFinished()));
mAnim = anim;
}
@@ -90,12 +91,6 @@
}
mSlidingOut = true;
animTo(0);
- connect(mAnim.data(), SIGNAL(finished()), SLOT(slotSlidedOut()));
-}
-
-void SlideContainer::slotSlidedOut()
-{
- mSlidingOut = false;
}
QSize SlideContainer::sizeHint() const
@@ -153,4 +148,14 @@
adjustContentGeometry();
}
+void SlideContainer::slotAnimFinished()
+{
+ if (height() == 0) {
+ mSlidingOut = false;
+ slidedOut();
+ } else {
+ slidedIn();
+ }
+}
+
} // namespace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/slidecontainer.h new/gwenview-4.8.1/lib/slidecontainer.h
--- old/gwenview-4.8.0/lib/slidecontainer.h 2011-12-02 22:32:06.000000000 +0100
+++ new/gwenview-4.8.1/lib/slidecontainer.h 2012-02-29 23:57:15.000000000 +0100
@@ -74,12 +74,16 @@
*/
void slideOut();
+Q_SIGNALS:
+ void slidedIn();
+ void slidedOut();
+
protected:
void resizeEvent(QResizeEvent*);
bool eventFilter(QObject*, QEvent* event);
private Q_SLOTS:
- void slotSlidedOut();
+ void slotAnimFinished();
private:
QWidget* mContent;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gwenview-4.8.0/lib/thumbnailview/thumbnailview.cpp new/gwenview-4.8.1/lib/thumbnailview/thumbnailview.cpp
--- old/gwenview-4.8.0/lib/thumbnailview/thumbnailview.cpp 2011-12-20 20:14:04.000000000 +0100
+++ new/gwenview-4.8.1/lib/thumbnailview/thumbnailview.cpp 2012-02-29 23:57:16.000000000 +0100
@@ -783,27 +783,18 @@
if (!isVisible() || !model()) {
return;
}
- KFileItemList list;
- QRect visibleRect = viewport()->rect();
- // Adjust visibleRect so that next thumbnail page|row
- // get generated too
- if (isWrapping()) {
- visibleRect.setHeight(visibleRect.height() * 2);
- } else {
- visibleRect.setWidth(visibleRect.width() * 2);
- }
+ const QRect visibleRect = viewport()->rect();
+ const int visibleSurface = visibleRect.width() * visibleRect.height();
+ const QPoint origin = visibleRect.center();
+
+ // distance => item
+ QMap