VirtualBox

Changeset 77266 in vbox


Ignore:
Timestamp:
Feb 11, 2019 4:30:25 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9373: macOS: Make UIGraphicsScrollArea aware of real pixel-delta of wheel-event on macOS where it's actual.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsScrollArea.cpp

    r77230 r77266  
    146146        QWheelEvent *pWheelEvent = static_cast<QWheelEvent*>(pEvent);
    147147        const QPoint angleDelta = pWheelEvent->angleDelta();
     148#ifdef VBOX_WS_MAC
     149        const QPoint pixelDelta = pWheelEvent->pixelDelta();
     150#endif
    148151        switch (m_enmOrientation)
    149152        {
     
    161164            {
    162165                if (angleDelta.y() > 0)
     166#ifdef VBOX_WS_MAC
     167                    m_pScrollBar->setValue(m_pScrollBar->value() - pixelDelta.y());
     168#else
    163169                    m_pScrollBar->setValue(m_pScrollBar->value() - m_pScrollBar->step());
     170#endif
    164171                else if (angleDelta.y() < 0)
     172#ifdef VBOX_WS_MAC
     173                    m_pScrollBar->setValue(m_pScrollBar->value() - pixelDelta.y());
     174#else
    165175                    m_pScrollBar->setValue(m_pScrollBar->value() + m_pScrollBar->step());
     176#endif
    166177                break;
    167178            }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette