diff options
| author | Peter Penz <[email protected]> | 2008-12-11 20:27:05 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-12-11 20:27:05 +0000 |
| commit | b60da9b67acbfe94e43bd631e4e685f366d53ec5 (patch) | |
| tree | 5abf8c7bcffb55ca9d9363b58f35cf5b802de900 /src/dolphincolumnwidget.cpp | |
| parent | aa5ffc8d89170b8e381f10ec846b07c1d81ec4e7 (diff) | |
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
Diffstat (limited to 'src/dolphincolumnwidget.cpp')
| -rw-r--r-- | src/dolphincolumnwidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 <QClipboard> #include <QPainter> #include <QPoint> +#include <QScrollBar> 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); } |
