Browse Source

Set wheel event to accepted only if we handle it

adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
e83019bdfa
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 4
      src/gui/properties/peerlistwidget.cpp
  2. 4
      src/gui/transferlistwidget.cpp

4
src/gui/properties/peerlistwidget.cpp

@ -455,10 +455,10 @@ void PeerListWidget::handleSortColumnChanged(int col) @@ -455,10 +455,10 @@ void PeerListWidget::handleSortColumnChanged(int col)
void PeerListWidget::wheelEvent(QWheelEvent *event)
{
event->accept();
if (event->modifiers() & Qt::ShiftModifier) {
// Shift + scroll = horizontal scroll
event->accept();
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
QTreeView::wheelEvent(&scrollHEvent);
return;

4
src/gui/transferlistwidget.cpp

@ -1226,10 +1226,10 @@ bool TransferListWidget::loadSettings() @@ -1226,10 +1226,10 @@ bool TransferListWidget::loadSettings()
void TransferListWidget::wheelEvent(QWheelEvent *event)
{
event->accept();
if (event->modifiers() & Qt::ShiftModifier) {
// Shift + scroll = horizontal scroll
event->accept();
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
QTreeView::wheelEvent(&scrollHEvent);
return;

Loading…
Cancel
Save