Fixed placing of drop overlay cross, resizing of floating widget to drop

area rectangle size prior to insertion
This commit is contained in:
Uwe Kindler
2017-04-11 23:26:33 +02:00
parent 051c379e4a
commit bc37a2788e
8 changed files with 970 additions and 895 deletions

View File

@@ -43,6 +43,7 @@
#include "DockWidget.h"
#include "DockOverlay.h"
#include <iostream>
namespace ads
{
@@ -91,6 +92,18 @@ void FloatingDockContainerPrivate::titleMouseReleaseEvent()
return;
}
// Resize the floating widget to the size of the highlighted drop area
// rectangle
QRect Rect = DockManager->containerOverlay()->dropOverlayRect();
if (!Rect.isValid())
{
Rect = DockManager->dockAreaOverlay()->rect();
}
if (Rect.isValid())
{
_this->resize(Rect.size());
}
DropContainer->dropFloatingWidget(_this, QCursor::pos());
DockManager->containerOverlay()->hideOverlay();
DockManager->dockAreaOverlay()->hideOverlay();