diff --git a/src/libs/utils/guiutils.cpp b/src/libs/utils/guiutils.cpp index 35830f1ca41..17cc9053002 100644 --- a/src/libs/utils/guiutils.cpp +++ b/src/libs/utils/guiutils.cpp @@ -2,19 +2,27 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "guiutils.h" +#include "hostosinfo.h" #include +#include #include namespace Utils { namespace Internal { +static bool isWheelModifier() +{ + return QGuiApplication::keyboardModifiers() + == (HostOsInfo::isMacHost() ? Qt::MetaModifier : Qt::ControlModifier); +} + class WheelEventFilter : public QObject { public: bool eventFilter(QObject *watched, QEvent *event) override { - if (event->type() == QEvent::Wheel) { + if (event->type() == QEvent::Wheel && !isWheelModifier()) { QWidget *widget = qobject_cast(watched); if (widget && widget->focusPolicy() != Qt::WheelFocus && !widget->hasFocus()) { QObject *parent = widget->parentWidget(); diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 8a2e0b43584..4aa3c6464d5 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -436,12 +436,6 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const if (widget && widget->inherits("QTreeView")) ret = 0; break; - case QStyle::SH_ComboBox_AllowWheelScrolling: - // Turn this on only when simultaneously pressing Ctrl, to prevent accidental current - // index change, e.g. on a scroll view - ret = QGuiApplication::keyboardModifiers() - == (HostOsInfo::isMacHost() ? Qt::MetaModifier : Qt::ControlModifier); - break; case QStyle::SH_Slider_AbsoluteSetButtons: // Make QSlider jump on left mouse click ret = Qt::LeftButton | Qt::MiddleButton | Qt::RightButton;