From b60da9b67acbfe94e43bd631e4e685f366d53ec5 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 11 Dec 2008 20:27:05 +0000 Subject: as the detailsview and columnview can also have icon sizes up to 256 x 256 pixels, the steps when using the scrollwheel must be adjusted dynamically svn path=/trunk/KDE/kdebase/apps/; revision=895825 --- src/dolphincolumnwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/dolphincolumnwidget.cpp') diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 8edcf9a80..c552d70e1 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -46,6 +46,7 @@ #include #include #include +#include DolphinColumnWidget::DolphinColumnWidget(QWidget* parent, DolphinColumnView* columnView, @@ -420,6 +421,10 @@ void DolphinColumnWidget::wheelEvent(QWheelEvent* event) event->ignore(); return; } + + const int height = m_decorationSize.height(); + const int step = (height >= KIconLoader::SizeHuge) ? height / 10 : (KIconLoader::SizeHuge - height) / 2; + verticalScrollBar()->setSingleStep(step); QListView::wheelEvent(event); } -- cgit v1.3