Giter Club home page Giter Club logo

Comments (4)

norcalli avatar norcalli commented on June 5, 2024

It might be a good idea to make this configurable in case it incurs a performance penalty on large folders, but it probably shouldn't if it's using an epoll-like implementation.

from qimgv.

norcalli avatar norcalli commented on June 5, 2024
From 1f249ce5f97b49b81bc7178a42ecf99e7756752d Mon Sep 17 00:00:00 2001
From: Ashkan Kiani <ashkan@zephyr>
Date: Sat, 16 Mar 2019 16:09:43 -0700
Subject: [PATCH] Add directory watching back in.

---
 components/directorymanager/directorymanager.cpp | 6 +++---
 gui/customwidgets/thumbnailview.cpp              | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/components/directorymanager/directorymanager.cpp b/components/directorymanager/directorymanager.cpp
index 1448f18..e29f673 100644
--- a/components/directorymanager/directorymanager.cpp
+++ b/components/directorymanager/directorymanager.cpp
@@ -51,9 +51,9 @@ void DirectoryManager::readSettings() {
 
 void DirectoryManager::setDirectory(QString path) {
     DirectoryWatcher* watcher = DirectoryWatcher::newInstance();
-    //watcher->setFileFilters(extensionFilters);
-    //watcher->setWatchPath(path);
-    //watcher->observe();
+    watcher->setFileFilters(settings->supportedFormats());
+    watcher->setWatchPath(path);
+    watcher->observe();
     connect(watcher, &DirectoryWatcher::observingStarted, this, [] () {
         qDebug() << "observing started";
     });
diff --git a/gui/customwidgets/thumbnailview.cpp b/gui/customwidgets/thumbnailview.cpp
index 0af9a10..3a67e69 100644
--- a/gui/customwidgets/thumbnailview.cpp
+++ b/gui/customwidgets/thumbnailview.cpp
@@ -88,6 +88,7 @@ void ThumbnailView::addItem() {
 // !! calls loadVisibleThumbnails() at the end
 void ThumbnailView::insertItem(int index) {
     ThumbnailWidget *widget = createThumbnailWidget();
+    widget->setThumbnailSize(mThumbnailSize);
     thumbnails.insert(index, widget);
     addItemToLayout(widget, index);
     fitSceneToContents();
-- 
2.21.0

@easymodo I looked through the code and noticed that the functionality was essentially already there. I did notice that the thumbnail was a bit broken in the gallery view, but it turns out it was missing a call to properly set the size. I've been using it since I fixed it, so I'm wondering what was missing from adding it? It seems to work just fine.

from qimgv.

easymodo avatar easymodo commented on June 5, 2024

build the dev branch it's already hooked up there

what was missing from adding it?

Yeah it was mostly there but pretty buggy iirc

from qimgv.

norcalli avatar norcalli commented on June 5, 2024

@easymodo ah I didn't see that since I did a shallow update. Thanks!

from qimgv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.