Improved detection of dock widget dragging - uses a distance now (half the height of dock area title bar)

This commit is contained in:
Uwe Kindler
2018-10-15 15:09:59 +02:00
parent ada3d6b3b5
commit 927be9a7d9
7 changed files with 26 additions and 7 deletions

View File

@@ -186,7 +186,9 @@ void CDockAreaTabBar::mouseMoveEvent(QMouseEvent* ev)
return;
}
if (!this->geometry().contains(ev->pos()))
int DragDistanceY = qAbs(d->DragStartMousePos.y() - ev->pos().y());
int MinDragDistanceY = this->height() / 2;
if (DragDistanceY >= MinDragDistanceY)
{
qDebug() << "CTabsScrollArea::startFloating";
startFloating(d->DragStartMousePos);