Update from toolwindowmanager repository @ 117c15c1c67a2

This commit is contained in:
baldurk
2024-08-05 15:41:59 +01:00
parent d78adf7e99
commit 90832a18f0
+27 -9
View File
@@ -1070,8 +1070,15 @@ void ToolWindowManager::updateDragPosition()
QPoint c = areaClientRect.center();
m_dropHotspots[AddTo]->move(c + QPoint(-hsize, -hsize));
m_dropHotspots[AddTo]->show();
if(m_hoverArea->allowUserDrop())
{
m_dropHotspots[AddTo]->move(c + QPoint(-hsize, -hsize));
m_dropHotspots[AddTo]->show();
}
else
{
m_dropHotspots[AddTo]->hide();
}
m_dropHotspots[TopOf]->move(c + QPoint(-hsize, -hsize - margin - size));
m_dropHotspots[TopOf]->show();
@@ -1322,9 +1329,12 @@ void ToolWindowManager::finishDrag()
{
if(m_hoverArea)
{
AreaReference ref(hotspot, m_hoverArea);
ref.dragResult = true;
moveToolWindows(draggedToolWindows, ref);
if(m_hoverArea->allowUserDrop() || hotspot != AreaReferenceType::AddTo)
{
AreaReference ref(hotspot, m_hoverArea);
ref.dragResult = true;
moveToolWindows(draggedToolWindows, ref);
}
}
else
{
@@ -1387,7 +1397,9 @@ void ToolWindowManager::drawHotspotPixmaps()
QPointF tip = fullRect.center() + QPointF(4, 0);
path.addPolygon(QPolygonF({
tip, tip + QPoint(3, 3), tip + QPoint(3, -3),
tip,
tip + QPoint(3, 3),
tip + QPoint(3, -3),
}));
}
else if(ref == TopOf)
@@ -1395,7 +1407,9 @@ void ToolWindowManager::drawHotspotPixmaps()
QPointF tip = fullRect.center() + QPointF(0, 4);
path.addPolygon(QPolygonF({
tip, tip + QPointF(-3, 3), tip + QPointF(3, 3),
tip,
tip + QPointF(-3, 3),
tip + QPointF(3, 3),
}));
}
else if(ref == RightOf)
@@ -1403,7 +1417,9 @@ void ToolWindowManager::drawHotspotPixmaps()
QPointF tip = fullRect.center() + QPointF(-4, 0);
path.addPolygon(QPolygonF({
tip, tip + QPointF(-3, 3), tip + QPointF(-3, -3),
tip,
tip + QPointF(-3, 3),
tip + QPointF(-3, -3),
}));
}
else if(ref == BottomOf)
@@ -1411,7 +1427,9 @@ void ToolWindowManager::drawHotspotPixmaps()
QPointF tip = fullRect.center() + QPointF(0, -4);
path.addPolygon(QPolygonF({
tip, tip + QPointF(-3, -3), tip + QPointF(3, -3),
tip,
tip + QPointF(-3, -3),
tip + QPointF(3, -3),
}));
}