mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
Fix scrolling in grid view.
This commit is contained in:
parent
279c885dfe
commit
4ad22a82d4
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user