Skip to content

Commit c3dc240

Browse files
committed
Qt: Fix QScroller interfering with Mac's touchpad
Mac's touchpad generates touch events which were conflicting with QScroller's TouchGesture, so a platform guard was added so touch scrolling is not compiled on macOS.
1 parent 5fbb5d3 commit c3dc240

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pcsx2-qt/GameList/GameListWidget.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ void GameListWidget::initialize()
271271
m_table_view->horizontalHeader()->setSectionsMovable(true);
272272
m_table_view->verticalHeader()->hide();
273273
m_table_view->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
274+
#ifndef Q_OS_MACOS
274275
QScroller::grabGesture(m_table_view->viewport(), QScroller::TouchGesture);
276+
#endif
275277

276278
// Custom painter to center-align DisplayRoles (icons)
277279
m_table_view->setItemDelegateForColumn(0, new GameListIconStyleDelegate(this));
@@ -330,7 +332,9 @@ void GameListWidget::initialize()
330332
m_list_view->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
331333
m_list_view->verticalScrollBar()->setSingleStep(15);
332334
onCoverScaleChanged();
335+
#ifndef Q_OS_MACOS
333336
QScroller::grabGesture(m_list_view->viewport(), QScroller::TouchGesture);
337+
#endif
334338

335339
connect(m_list_view->selectionModel(), &QItemSelectionModel::currentChanged, this,
336340
&GameListWidget::onSelectionModelCurrentChanged);

0 commit comments

Comments
 (0)