mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Fix scrolling in grid view.
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user