mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
TabBar: Increase drag start distance to not disturb tab moving
Also remove no longer needed timer to show add tab button.
This commit is contained in:
parent
23f84abc3b
commit
21bd073482
@ -470,7 +470,7 @@ void TabBar::mouseMoveEvent(QMouseEvent* event)
|
|||||||
} else if (eventY > height()) {
|
} else if (eventY > height()) {
|
||||||
offset = eventY - height();
|
offset = eventY - height();
|
||||||
}
|
}
|
||||||
if (offset > QApplication::startDragDistance()) {
|
if (offset > QApplication::startDragDistance() * 3) {
|
||||||
const QPoint global = mapToGlobal(m_dragStartPosition);
|
const QPoint global = mapToGlobal(m_dragStartPosition);
|
||||||
QWidget *w = QApplication::widgetAt(global);
|
QWidget *w = QApplication::widgetAt(global);
|
||||||
if (w) {
|
if (w) {
|
||||||
@ -500,10 +500,6 @@ void TabBar::mouseReleaseEvent(QMouseEvent* event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_tabWidget->buttonAddTab()->isHidden() && !isMainBarOverflowed()) {
|
|
||||||
QTimer::singleShot(ComboTabBar::slideAnimationDuration(), m_tabWidget->buttonAddTab(), &AddTabButton::show);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!rect().contains(event->pos())) {
|
if (!rect().contains(event->pos())) {
|
||||||
ComboTabBar::mouseReleaseEvent(event);
|
ComboTabBar::mouseReleaseEvent(event);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user