Fixed start drag distance to be based on QApplication::startDragDistance, fixed dragging of dock widget title bar to support dragging in x and y direction

This commit is contained in:
Uwe Kindler
2018-11-05 09:58:46 +01:00
parent c973482b2b
commit 74b9d35c7b
4 changed files with 20 additions and 5 deletions

View File

@@ -281,8 +281,7 @@ void CDockWidgetTab::mouseMoveEvent(QMouseEvent* ev)
// Maybe a fixed drag distance is better here ?
int DragDistanceY = qAbs(d->DragStartMousePosition.y() - ev->pos().y());
int MinDragDistanceY = d->DockArea->titleBarGeometry().height() / 2;
if (DragDistanceY >= MinDragDistanceY)
if (DragDistanceY >= CDockManager::startDragDistance())
{
// If this is the last dock area in a dock container with only
// one single dock widget it does not make sense to move it to a new