forked from qt-creator/qt-creator
QmlDesigner: Adjust margings for "move zone"
I introduced a zone around the boarder of each item where it can always be dragged, instead of selection another overlapping item. The area is now a lot smaller, but the 4px seem enough for me when testing it. This zone is slightly to big. I keep the size of 20px at the top so the label/gizmo is always dragable. Change-Id: Ia1b8afb822b506f5322b952d5537eafc73b52ea2 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -152,8 +152,8 @@ bool AbstractFormEditorTool::selectedItemCursorInMovableArea(const QPointF &pos)
|
|||||||
QRectF boundingRect = boundingRectInSceneSpace.boundingRect();
|
QRectF boundingRect = boundingRectInSceneSpace.boundingRect();
|
||||||
QRectF innerRect = boundingRect;
|
QRectF innerRect = boundingRect;
|
||||||
|
|
||||||
innerRect.adjust(10, 10, -10, -10);
|
innerRect.adjust(2, 2, -2, -2);
|
||||||
boundingRect.adjust(-10, -20, 10, 10);
|
boundingRect.adjust(-2, -20, 2, 2);
|
||||||
|
|
||||||
return !innerRect.contains(pos) && boundingRect.contains(pos);
|
return !innerRect.contains(pos) && boundingRect.contains(pos);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user