Added support for canceling non opaque docking with escape key, fixed state of non opaque docking when switching applications (if application becomes inactive)

This commit is contained in:
Uwe Kindler
2019-12-16 11:10:59 +01:00
parent 8c1f065f3f
commit ffd35cbce3
4 changed files with 66 additions and 3 deletions

View File

@@ -201,8 +201,9 @@ void CDockAreaTabBar::mouseReleaseEvent(QMouseEvent* ev)
void CDockAreaTabBar::mouseMoveEvent(QMouseEvent* ev)
{
QScrollArea::mouseMoveEvent(ev);
if (ev->buttons() != Qt::LeftButton)
if (!(ev->buttons() & Qt::LeftButton) || d->isDraggingState(DraggingInactive))
{
d->DragState = DraggingInactive;
return;
}
@@ -276,7 +277,12 @@ IFloatingWidget* CDockAreaTabBar::makeAreaFloating(const QPoint& Offset, eDragSt
}
else
{
FloatingWidget = new CFloatingOverlay(d->DockArea);
auto w = new CFloatingOverlay(d->DockArea);
connect(w, &CFloatingOverlay::draggingCanceled, [=]()
{
d->DragState = DraggingInactive;
});
FloatingWidget = w;
}
FloatingWidget->startFloating(Offset, Size, DragState, nullptr);