Commit f3bc890d authored by Tom Moebert's avatar Tom Moebert Committed by Nate Graham
Browse files

Disable smoothing thumbnails in LowResourceUsageMode

Summary:
If LowResourceUsageMode is enabled, do not waste resources on smoothing-scaling small thumbnails.

Depends on D21406

Reviewers: #gwenview, ngraham

Reviewed By: #gwenview, ngraham

Subscribers: ngraham, #gwenview

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D21407
parent b783f06f
......@@ -50,6 +50,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "abstractthumbnailviewhelper.h"
#include "archiveutils.h"
#include "dragpixmapgenerator.h"
#include "gwenviewconfig.h"
#include "mimetypeutils.h"
#include "urlutils.h"
#include <lib/gvdebug.h>
......@@ -666,7 +667,7 @@ QPixmap ThumbnailView::thumbnailForIndex(const QModelIndex& index, QSize* fullSi
if (thumbnail.mAdjustedPix.isNull()) {
d->roughAdjustThumbnail(&thumbnail);
}
if (thumbnail.mRough && !d->mSmoothThumbnailQueue.contains(url)) {
if (GwenviewConfig::lowResourceUsageMode() && thumbnail.mRough && !d->mSmoothThumbnailQueue.contains(url)) {
d->mSmoothThumbnailQueue.enqueue(url);
if (!d->mSmoothThumbnailTimer.isActive()) {
d->mSmoothThumbnailTimer.start(SMOOTH_DELAY);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment