Changeset 77156 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 4, 2019 6:10:00 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128631
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsScrollArea.cpp
r77086 r77156 106 106 layoutWidgets(); 107 107 108 /* Handle redirected wheel events: */ 109 if (pEvent->type() == QEvent::Wheel) 110 { 111 QWheelEvent *pWheelEvent = static_cast<QWheelEvent*>(pEvent); 112 const QPoint angleDelta = pWheelEvent->angleDelta(); 113 switch (m_enmOrientation) 114 { 115 /* Scroll viewport horizontally: */ 116 case Qt::Horizontal: 117 { 118 if (angleDelta.x() > 0) 119 m_pScrollBar->setValue(m_pScrollBar->value() - m_pScrollBar->wheelStep()); 120 else 121 m_pScrollBar->setValue(m_pScrollBar->value() + m_pScrollBar->wheelStep()); 122 break; 123 } 124 /* Scroll viewport vertically: */ 125 case Qt::Vertical: 126 { 127 if (angleDelta.y() > 0) 128 m_pScrollBar->setValue(m_pScrollBar->value() - m_pScrollBar->wheelStep()); 129 else 130 m_pScrollBar->setValue(m_pScrollBar->value() + m_pScrollBar->wheelStep()); 131 break; 132 } 133 } 134 } 135 108 136 /* Call to base-class: */ 109 137 return QIGraphicsWidget::eventFilter(pObject, pEvent);
Note:
See TracChangeset
for help on using the changeset viewer.