diff options
| author | Akseli Lahtinen <[email protected]> | 2025-06-13 13:46:40 +0300 |
|---|---|---|
| committer | Akseli Lahtinen <[email protected]> | 2025-06-19 19:07:19 +0300 |
| commit | b1d46a3cbd6dd70a6ec7e31d2d11056a5f5c6d91 (patch) | |
| tree | 0c3764ac400dd30e36546d7410e246d244965ba6 /src | |
| parent | 29cee51ac2cff5acddf1f9b4e005de23d0cb0c8d (diff) | |
AnimatedHeightWidget: Disable scrollbars
QScrollArea is used to avoid increasing view width, and not for actual
scroll reasons.
We should therefore disallow scrolling the view entirely, since this
causes bugs with being able to scroll random views.
BUG: 504252
Diffstat (limited to 'src')
| -rw-r--r-- | src/animatedheightwidget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/animatedheightwidget.cpp b/src/animatedheightwidget.cpp index f1631bb6f..cd62f3971 100644 --- a/src/animatedheightwidget.cpp +++ b/src/animatedheightwidget.cpp @@ -10,6 +10,7 @@ #include <QGridLayout> #include <QPropertyAnimation> #include <QScrollArea> +#include <QScrollBar> #include <QStyle> AnimatedHeightWidget::AnimatedHeightWidget(QWidget *parent) @@ -30,6 +31,9 @@ AnimatedHeightWidget::AnimatedHeightWidget(QWidget *parent) m_contentsContainerParent->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_contentsContainerParent->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_contentsContainerParent->setWidgetResizable(true); + // Disables manual scrolling, for example with mouse scrollwheel. + m_contentsContainerParent->verticalScrollBar()->setEnabled(false); + m_contentsContainerParent->horizontalScrollBar()->setEnabled(false); setMinimumWidth(0); } |
