diff --git a/CHANGELOG.md b/CHANGELOG.md index ca8b2c31..2502c6c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Minor: Add an option for the reduced opacity of message history. (#6121) - Minor: Make paused chat indicator more visible, and fix its zoom behavior. (#6123) - Bugfix: Don't create native messaging manifest file if browser directory doesn't exist. (#6116) +- Bugfix: Fixed scrolling now working on inputs in the settings. (#6128) - Bugfix: Make reply-cancel button less coarse-grained. (#6106) - Bugfix: Fixed missing BetterTTV live updates of emotes. (#6132) - Bugfix: Handle CMD + BACKSPACE behavior explicitly in main chat dialog input for macOS. (#6111) diff --git a/src/widgets/settingspages/GeneralPageView.cpp b/src/widgets/settingspages/GeneralPageView.cpp index b3d4118f..ed715280 100644 --- a/src/widgets/settingspages/GeneralPageView.cpp +++ b/src/widgets/settingspages/GeneralPageView.cpp @@ -254,7 +254,7 @@ QSpinBox *GeneralPageView::addIntInput(const QString &text, IntSetting &setting, auto *label = new QLabel(text + ":"); this->addToolTip(*label, toolTipText); - auto *input = new QSpinBox; + auto *input = new SpinBox; input->setMinimum(min); input->setMaximum(max); diff --git a/src/widgets/settingspages/GeneralPageView.hpp b/src/widgets/settingspages/GeneralPageView.hpp index a9cf94b1..955a3dbc 100644 --- a/src/widgets/settingspages/GeneralPageView.hpp +++ b/src/widgets/settingspages/GeneralPageView.hpp @@ -76,9 +76,29 @@ class ComboBox : public QComboBox { Q_OBJECT +protected: void wheelEvent(QWheelEvent *event) override { - (void)event; + event->ignore(); + } +}; + +class SpinBox : public QSpinBox +{ + Q_OBJECT + +public: + SpinBox(QWidget *parent = nullptr) + : QSpinBox(parent) + { + // QAbstractSpinBox defaults to Qt::WheelFocus + this->setFocusPolicy(Qt::StrongFocus); + } + +protected: + void wheelEvent(QWheelEvent *event) override + { + event->ignore(); } }; diff --git a/src/widgets/settingspages/SettingWidget.cpp b/src/widgets/settingspages/SettingWidget.cpp index 6eaaf9cc..02c49aba 100644 --- a/src/widgets/settingspages/SettingWidget.cpp +++ b/src/widgets/settingspages/SettingWidget.cpp @@ -119,7 +119,7 @@ SettingWidget *SettingWidget::intInput(const QString &label, auto *lbl = new QLabel(label + ":"); - auto *input = new QSpinBox; + auto *input = new SpinBox; if (params.min.has_value()) { input->setMinimum(params.min.value());