diff --git a/src/libtomahawk/playlist/GridView.cpp b/src/libtomahawk/playlist/GridView.cpp index 984c5dabd..1b4931a7d 100644 --- a/src/libtomahawk/playlist/GridView.cpp +++ b/src/libtomahawk/playlist/GridView.cpp @@ -213,6 +213,19 @@ GridView::resizeEvent( QResizeEvent* event ) } +void GridView::wheelEvent( QWheelEvent* e ) +{ +#ifndef Q_WS_MAC + //HACK: Workaround for QTBUG-7232: Smooth scrolling (scroll per pixel) in ItemViews + // does not work as expected. + verticalScrollBar()->setSingleStep( delegate()->itemSize().height() / 8 ); + // ^ scroll step is 1/8 of the estimated row height +#endif + + QListView::wheelEvent( e ); +} + + void GridView::verifySize() { diff --git a/src/libtomahawk/playlist/GridView.h b/src/libtomahawk/playlist/GridView.h index 2db377ae2..2419dce25 100644 --- a/src/libtomahawk/playlist/GridView.h +++ b/src/libtomahawk/playlist/GridView.h @@ -91,6 +91,7 @@ protected: void paintEvent( QPaintEvent* event ); void resizeEvent( QResizeEvent* event ); + void wheelEvent( QWheelEvent* ); protected slots: virtual void currentChanged( const QModelIndex& current, const QModelIndex& previous );