X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/dcbf1a11783d47e7e4fa30d488ac93a8bc547e71..148282e2d856b47ceb191eeef4c834118c8cdffd:/src/dolphiniconsview.cpp diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 52be40b02..b95de351a 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -22,6 +22,7 @@ #include "dolphincategorydrawer.h" #include "dolphincontroller.h" #include "dolphinsettings.h" +#include "dolphinviewautoscroller.h" #include "dolphin_iconsmodesettings.h" #include "dolphin_generalsettings.h" #include "draganddrophelper.h" @@ -61,6 +62,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle viewport()->setAcceptDrops(true); setMouseTracking(true); + new DolphinViewAutoScroller(this); connect(this, SIGNAL(clicked(const QModelIndex&)), controller, SLOT(requestTab(const QModelIndex&))); @@ -152,7 +154,7 @@ void DolphinIconsView::dataChanged(const QModelIndex& topLeft, const QModelIndex KCategorizedView::dataChanged(topLeft, bottomRight); KCategorizedSortFilterProxyModel* proxyModel = dynamic_cast(model()); - if ((flow() == QListView::LeftToRight) && !proxyModel->isCategorizedModel()) { + if (!proxyModel->isCategorizedModel()) { // bypass a QListView issue that items are not layout correctly if the decoration size of // an index changes scheduleDelayedItemsLayout(); @@ -275,6 +277,10 @@ void DolphinIconsView::wheelEvent(QWheelEvent* event) event->ignore(); return; } + + horizontalScrollBar()->setSingleStep(m_itemSize.width() / 10); + verticalScrollBar()->setSingleStep(m_itemSize.height() / 10); + KCategorizedView::wheelEvent(event); // if the icons are aligned left to right, the vertical wheel event should // be applied to the horizontal scrollbar