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

@@ -151,7 +151,12 @@ struct DockWidgetTabPrivate
}
else
{
return new CFloatingOverlay(Widget);
auto w = new CFloatingOverlay(Widget);
_this->connect(w, &CFloatingOverlay::draggingCanceled, [=]()
{
DragState = DraggingInactive;
});
return w;
}
}
};
@@ -246,6 +251,7 @@ bool DockWidgetTabPrivate::startFloating(eDragState DraggingState)
IFloatingWidget* FloatingWidget = nullptr;
bool OpaqueUndocking = CDockManager::configFlags().testFlag(CDockManager::OpaqueUndocking) ||
(DraggingFloatingWidget != DraggingState);
// If section widget has multiple tabs, we take only one tab
// If it has only one single tab, we can move the complete
// dock area into floating widget