VirtualBox

Changeset 88415 in vbox


Ignore:
Timestamp:
Apr 8, 2021 12:36:34 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9831. Restoring wheel event

File:
1 edited

Legend:

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

    r88411 r88415  
    544544void UIHelpViewer::wheelEvent(QWheelEvent *pEvent)
    545545{
    546     Q_UNUSED(pEvent);
    547     /* Disable wheel scaling for now: */
    548 #if 0
    549     int iPreviousSize = font().pointSize();
    550     /* QTextBrowser::wheelEvent sets a new font size: */
    551     QTextBrowser::wheelEvent(pEvent);
    552     /* Don't allow font size to get too large or small: */
    553     if (font().pointSize() >= UIHelpBrowserWidget::fontScaleMinMax.second * m_iInitialFontPointSize ||
    554         font().pointSize() <= UIHelpBrowserWidget::fontScaleMinMax.first * m_iInitialFontPointSize)
    555     {
    556         QFont mFont = font();
    557         mFont.setPointSize(iPreviousSize);
    558         setFont(mFont);
    559     }
    560     else
    561         emit sigFontPointSizeChanged(font().pointSize());
    562 #endif
     546    /* QTextBrowser::wheelEvent scales font when some modifiers are pressed. We dont want: */
     547    if (pEvent && pEvent->modifiers() == Qt::NoModifier)
     548        QTextBrowser::wheelEvent(pEvent);
    563549}
    564550
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