From: Akseli Lahtinen Date: Fri, 13 Jun 2025 10:46:40 +0000 (+0300) Subject: AnimatedHeightWidget: Disable scrollbars X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/b1d46a3cbd6dd70a6ec7e31d2d11056a5f5c6d91?ds=inline 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 --- 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 #include #include +#include #include 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); }