1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-03-31 10:22:39 +08:00

Improved tab bar scrolling

This commit is contained in:
Ivan Ugryumov 2024-11-27 16:21:50 +03:00
parent f2378636e2
commit ec437cdaa7
2 changed files with 1 additions and 21 deletions

View File

@ -157,22 +157,6 @@ CDockAreaTabBar::~CDockAreaTabBar()
}
//============================================================================
void CDockAreaTabBar::wheelEvent(QWheelEvent* Event)
{
Event->accept();
const int direction = Event->angleDelta().y();
if (direction < 0)
{
horizontalScrollBar()->setValue(horizontalScrollBar()->value() + 20);
}
else
{
horizontalScrollBar()->setValue(horizontalScrollBar()->value() - 20);
}
}
//============================================================================
void CDockAreaTabBar::setCurrentIndex(int index)
{
@ -356,7 +340,7 @@ void CDockAreaTabBar::onCloseOtherTabsRequested()
CDockWidget::DockWidgetDeleteOnClose) ? 1 : 0;
closeTab(i);
// If the the dock widget blocks closing, i.e. if the flag
// If the dock widget blocks closing, i.e. if the flag
// CustomCloseHandling is set, and the dock widget is still open,
// then we do not need to correct the index
if (Tab->dockWidget()->isClosed())

View File

@ -64,10 +64,6 @@ private Q_SLOTS:
void onCloseOtherTabsRequested();
void onTabWidgetMoved(const QPoint& GlobalPos);
protected:
virtual void wheelEvent(QWheelEvent* Event) override;
public:
using Super = QScrollArea;