VirtualBox

Changeset 88489 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 13, 2021 10:27:54 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9831. Wheel zoom

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp

    r88488 r88489  
    573573void UIHelpViewer::wheelEvent(QWheelEvent *pEvent)
    574574{
    575     if (m_fOverlayMode)
    576         return;
    577     /* QTextBrowser::wheelEvent scales font when some modifiers are pressed. We dont want: */
    578     if (pEvent && pEvent->modifiers() == Qt::NoModifier)
     575    if (m_fOverlayMode && !pEvent)
     576        return;
     577    /* QTextBrowser::wheelEvent scales font when some modifiers are pressed. We dont want that: */
     578    if (pEvent->modifiers() == Qt::NoModifier)
    579579        QTextBrowser::wheelEvent(pEvent);
     580    else if (pEvent->modifiers() == Qt::ShiftModifier)
     581    {
     582        if (pEvent->angleDelta().y() < 0)
     583            zoom(ZoomOperation_In);
     584        else if (pEvent->angleDelta().y() > 0)
     585            zoom(ZoomOperation_Out);
     586    }
    580587}
    581588
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