From 21bd0734820d8003767be02377f7de8a0392056b Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 8 Jan 2018 20:11:50 +0100 Subject: [PATCH] TabBar: Increase drag start distance to not disturb tab moving Also remove no longer needed timer to show add tab button. --- src/lib/tabwidget/tabbar.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/tabwidget/tabbar.cpp b/src/lib/tabwidget/tabbar.cpp index b695be9c2..8f3c756d3 100644 --- a/src/lib/tabwidget/tabbar.cpp +++ b/src/lib/tabwidget/tabbar.cpp @@ -470,7 +470,7 @@ void TabBar::mouseMoveEvent(QMouseEvent* event) } else if (eventY > height()) { offset = eventY - height(); } - if (offset > QApplication::startDragDistance()) { + if (offset > QApplication::startDragDistance() * 3) { const QPoint global = mapToGlobal(m_dragStartPosition); QWidget *w = QApplication::widgetAt(global); if (w) { @@ -500,10 +500,6 @@ void TabBar::mouseReleaseEvent(QMouseEvent* event) return; } - if (m_tabWidget->buttonAddTab()->isHidden() && !isMainBarOverflowed()) { - QTimer::singleShot(ComboTabBar::slideAnimationDuration(), m_tabWidget->buttonAddTab(), &AddTabButton::show); - } - if (!rect().contains(event->pos())) { ComboTabBar::mouseReleaseEvent(event); return;